initialisation des tests
This commit is contained in:
@@ -16,6 +16,10 @@ import src.fr.api.*;
|
||||
public class test {
|
||||
CategoryImpl engine = new CategoryImpl("Engine");
|
||||
CategoryImpl transmission = new CategoryImpl("Transmission");
|
||||
CategoryImpl exterior = new CategoryImpl("Exterior");
|
||||
CategoryImpl interior = new CategoryImpl("Interior");
|
||||
|
||||
|
||||
|
||||
|
||||
Engine EG100 = new Engine("EG100",engine);
|
||||
@@ -32,84 +36,65 @@ public class test {
|
||||
Transmission TSF7= new Transmission("TSF7", transmission);
|
||||
Transmission TC120= new Transmission("TC120", transmission);
|
||||
|
||||
/*
|
||||
Category Engine = new CategoryImpl("Engine");
|
||||
Category Transmission = new CategoryImpl("Transmission");
|
||||
Category Exterior= new CategoryImpl("Exterior");
|
||||
Category Interior= new CategoryImpl("Interior");
|
||||
Exterior XC= new Exterior("XC", exterior);
|
||||
Exterior XM= new Exterior("XM", exterior);
|
||||
Exterior XS= new Exterior("XS", exterior);
|
||||
|
||||
//PartType
|
||||
PartType EG100= new PartTypeImpl("EG100", Engine);
|
||||
PartType EG133= new PartTypeImpl("EG133", Engine);
|
||||
PartType EG210= new PartTypeImpl("EG210", Engine);
|
||||
PartType ED110= new PartTypeImpl("ED110", Engine);
|
||||
PartType ED180= new PartTypeImpl("ED180", Engine);
|
||||
PartType EH120= new PartTypeImpl("EH120", Engine);
|
||||
Interior IN= new Interior("IN", interior);
|
||||
Interior IH= new Interior("IH", interior);
|
||||
Interior IS= new Interior("IS", interior);
|
||||
|
||||
PartType TM5= new PartTypeImpl("TM5", Transmission);
|
||||
PartType TM6= new PartTypeImpl("TM6", Transmission);
|
||||
PartType TA5= new PartTypeImpl("TA5", Transmission);
|
||||
PartType TS6= new PartTypeImpl("TS6", Transmission);
|
||||
PartType TSF7= new PartTypeImpl("TSF7", Transmission);
|
||||
PartType TC120= new PartTypeImpl("TC120", Transmission);
|
||||
|
||||
PartType XC= new PartTypeImpl("XC", Exterior);
|
||||
PartType XM= new PartTypeImpl("XM", Exterior);
|
||||
PartType XS= new PartTypeImpl("XS", Exterior);
|
||||
|
||||
PartType IN= new PartTypeImpl("IN", Interior);
|
||||
PartType IH= new PartTypeImpl("IH", Interior);
|
||||
PartType IS= new PartTypeImpl("IS", Interior);
|
||||
|
||||
CompatibilityManager cm = new CompatibilityManagerImpl();
|
||||
*/
|
||||
@Before
|
||||
public void init(){
|
||||
|
||||
/*
|
||||
|
||||
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
||||
EH120Requirement.add(TC120);
|
||||
EH120Requirement.add(TC120.getType());
|
||||
|
||||
Set<PartType> TA5Incompatibilities = new HashSet<PartType>();
|
||||
TA5Incompatibilities.add(EG100);
|
||||
TA5Incompatibilities.add(EG100.getType());
|
||||
|
||||
Set<PartType> TSF7Incompatibilities = new HashSet<PartType>();
|
||||
TSF7Incompatibilities.add(EG100);
|
||||
TSF7Incompatibilities.add(EG133);
|
||||
TSF7Incompatibilities.add(ED110);
|
||||
TSF7Incompatibilities.add(EG100.getType());
|
||||
TSF7Incompatibilities.add(EG133.getType());
|
||||
TSF7Incompatibilities.add(ED110.getType());
|
||||
|
||||
Set<PartType> TC120Requirement = new HashSet<PartType>();
|
||||
TC120Requirement.add(EH120);
|
||||
TC120Requirement.add(EH120.getType());
|
||||
|
||||
Set<PartType> XCIncompatibilities = new HashSet<PartType>();
|
||||
XCIncompatibilities.add(EG210);
|
||||
XCIncompatibilities.add(EG210.getType());
|
||||
|
||||
Set<PartType> XMIncompatibilities = new HashSet<PartType>();
|
||||
XMIncompatibilities.add(EG100);
|
||||
XMIncompatibilities.add(EG100.getType());
|
||||
|
||||
Set<PartType> XSIncompatibilities = new HashSet<PartType>();
|
||||
XSIncompatibilities.add(EG100);
|
||||
XSIncompatibilities.add(EG100.getType());
|
||||
Set<PartType> XSRequirement = new HashSet<PartType>();
|
||||
XSRequirement.add(IS);
|
||||
XSRequirement.add(IS.getType());
|
||||
|
||||
Set<PartType> ISIncompatibilities = new HashSet<PartType>();
|
||||
ISIncompatibilities.add(EG100);
|
||||
ISIncompatibilities.add(TM5);
|
||||
ISIncompatibilities.add(EG100.getType());
|
||||
ISIncompatibilities.add(TM5.getType());
|
||||
Set<PartType> ISRequirement = new HashSet<PartType>();
|
||||
ISRequirement.add(XS);
|
||||
ISRequirement.add(XS.getType());
|
||||
|
||||
cm.addRequirements(EH120, EH120Requirement);
|
||||
cm.addIncompatibilities(TA5, TA5Incompatibilities);
|
||||
cm.addIncompatibilities(TSF7, TSF7Incompatibilities);
|
||||
cm.addRequirements(TC120, TC120Requirement);
|
||||
cm.addIncompatibilities(XC, XCIncompatibilities);
|
||||
cm.addIncompatibilities(XM, XMIncompatibilities);
|
||||
cm.addIncompatibilities(XS, XSIncompatibilities);
|
||||
cm.addRequirements(XS, XSRequirement);
|
||||
cm.addIncompatibilities(IS, ISIncompatibilities);
|
||||
cm.addRequirements(IS, ISRequirement);
|
||||
cm.addRequirements(EH120.getType(), EH120Requirement);
|
||||
cm.addIncompatibilities(TA5.getType(), TA5Incompatibilities);
|
||||
cm.addIncompatibilities(TSF7.getType(), TSF7Incompatibilities);
|
||||
cm.addRequirements(TC120.getType(), TC120Requirement);
|
||||
cm.addIncompatibilities(XC.getType(), XCIncompatibilities);
|
||||
cm.addIncompatibilities(XM.getType(), XMIncompatibilities);
|
||||
cm.addIncompatibilities(XS.getType(), XSIncompatibilities);
|
||||
cm.addRequirements(XS.getType(), XSRequirement);
|
||||
cm.addIncompatibilities(IS.getType(), ISIncompatibilities);
|
||||
cm.addRequirements(IS.getType(), ISRequirement);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user