90 lines
2.9 KiB
Java
90 lines
2.9 KiB
Java
package tests;
|
|
import src.*;
|
|
import java.util.Set;
|
|
import java.util.HashSet;
|
|
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
import org.junit.Test;
|
|
|
|
public class test {
|
|
public static void main(String[] args){
|
|
Category Engine = new Category("Engine");
|
|
Category Transmission = new Category("Transmission");
|
|
Category Exterior= new Category("Exterior");
|
|
Category Interior= new Category("Interior");
|
|
|
|
//PartType
|
|
PartType EG100= new PartType("EG100", Engine);
|
|
PartType EG133= new PartType("EG133", Engine);
|
|
PartType EG210= new PartType("EG210", Engine);
|
|
PartType ED110= new PartType("ED110", Engine);
|
|
PartType ED180= new PartType("ED180", Engine);
|
|
PartType EH120= new PartType("EH120", Engine);
|
|
|
|
PartType TM5= new PartType("TM5", Transmission);
|
|
PartType TM6= new PartType("TM6", Transmission);
|
|
PartType TA5= new PartType("TA5", Transmission);
|
|
PartType TS6= new PartType("TS6", Transmission);
|
|
PartType TSF7= new PartType("TSF7", Transmission);
|
|
PartType TC120= new PartType("TC120", Transmission);
|
|
|
|
PartType XC= new PartType("XC", Exterior);
|
|
PartType XM= new PartType("XM", Exterior);
|
|
PartType XS= new PartType("XS", Exterior);
|
|
|
|
PartType IN= new PartType("IN", Interior);
|
|
PartType IH= new PartType("IH", Interior);
|
|
PartType IS= new PartType("IS", Interior);
|
|
|
|
CompatibilityManager cm = new CompatibilityManager();
|
|
|
|
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
|
EH120Requirement.add(TC120);
|
|
|
|
Set<PartType> TA5Incompatibilities = new HashSet<PartType>();
|
|
TA5Incompatibilities.add(TA5);
|
|
|
|
Set<PartType> TSF7Incompatibilities = new HashSet<PartType>();
|
|
TSF7Incompatibilities.add(EG100);
|
|
TSF7Incompatibilities.add(EG133);
|
|
TSF7Incompatibilities.add(ED110);
|
|
|
|
Set<PartType> TC120Requirement = new HashSet<PartType>();
|
|
TC120Requirement.add(EH120);
|
|
|
|
Set<PartType> XCIncompatibilities = new HashSet<PartType>();
|
|
XCIncompatibilities.add(EG210);
|
|
|
|
Set<PartType> XMIncompatibilities = new HashSet<PartType>();
|
|
XMIncompatibilities.add(EG100);
|
|
|
|
Set<PartType> XSIncompatibilities = new HashSet<PartType>();
|
|
XSIncompatibilities.add(EG100);
|
|
Set<PartType> XSRequirement = new HashSet<PartType>();
|
|
XSRequirement.add(IS);
|
|
|
|
Set<PartType> ISIncompatibilities = new HashSet<PartType>();
|
|
ISIncompatibilities.add(EG100);
|
|
ISIncompatibilities.add(TM5);
|
|
Set<PartType> ISRequirement = new HashSet<PartType>();
|
|
ISRequirement.add(XS);
|
|
|
|
cm.addRequirements(EH120, (HashSet<PartType>) EH120Requirement);
|
|
|
|
|
|
}
|
|
|
|
@Test
|
|
public void test(){
|
|
assertTrue(true);
|
|
}
|
|
@Test
|
|
public void test2(){
|
|
assertEquals(1,1); //very Important test
|
|
}
|
|
|
|
|
|
}
|