initialisation des tests
This commit is contained in:
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# bloop and metals
|
||||||
|
.bloop
|
||||||
|
.bsp
|
||||||
|
.metals
|
||||||
|
project/metals.sbt
|
||||||
|
|
||||||
|
# vs code
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package src.fr.impl.Parts;
|
package src.fr.impl.Parts;
|
||||||
|
|
||||||
import src.fr.api.PartType;
|
|
||||||
import src.fr.impl.CategoryImpl;
|
import src.fr.impl.CategoryImpl;
|
||||||
import src.fr.impl.PartImpl;
|
import src.fr.impl.PartImpl;
|
||||||
import src.fr.impl.PartTypeImpl;
|
import src.fr.impl.PartTypeImpl;
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ import src.fr.api.*;
|
|||||||
public class test {
|
public class test {
|
||||||
CategoryImpl engine = new CategoryImpl("Engine");
|
CategoryImpl engine = new CategoryImpl("Engine");
|
||||||
CategoryImpl transmission = new CategoryImpl("Transmission");
|
CategoryImpl transmission = new CategoryImpl("Transmission");
|
||||||
|
CategoryImpl exterior = new CategoryImpl("Exterior");
|
||||||
|
CategoryImpl interior = new CategoryImpl("Interior");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Engine EG100 = new Engine("EG100",engine);
|
Engine EG100 = new Engine("EG100",engine);
|
||||||
@@ -32,84 +36,65 @@ public class test {
|
|||||||
Transmission TSF7= new Transmission("TSF7", transmission);
|
Transmission TSF7= new Transmission("TSF7", transmission);
|
||||||
Transmission TC120= new Transmission("TC120", transmission);
|
Transmission TC120= new Transmission("TC120", transmission);
|
||||||
|
|
||||||
/*
|
Exterior XC= new Exterior("XC", exterior);
|
||||||
Category Engine = new CategoryImpl("Engine");
|
Exterior XM= new Exterior("XM", exterior);
|
||||||
Category Transmission = new CategoryImpl("Transmission");
|
Exterior XS= new Exterior("XS", exterior);
|
||||||
Category Exterior= new CategoryImpl("Exterior");
|
|
||||||
Category Interior= new CategoryImpl("Interior");
|
|
||||||
|
|
||||||
//PartType
|
Interior IN= new Interior("IN", interior);
|
||||||
PartType EG100= new PartTypeImpl("EG100", Engine);
|
Interior IH= new Interior("IH", interior);
|
||||||
PartType EG133= new PartTypeImpl("EG133", Engine);
|
Interior IS= new Interior("IS", interior);
|
||||||
PartType EG210= new PartTypeImpl("EG210", Engine);
|
|
||||||
PartType ED110= new PartTypeImpl("ED110", Engine);
|
|
||||||
PartType ED180= new PartTypeImpl("ED180", Engine);
|
|
||||||
PartType EH120= new PartTypeImpl("EH120", Engine);
|
|
||||||
|
|
||||||
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();
|
CompatibilityManager cm = new CompatibilityManagerImpl();
|
||||||
*/
|
|
||||||
@Before
|
@Before
|
||||||
public void init(){
|
public void init(){
|
||||||
|
|
||||||
/*
|
|
||||||
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
||||||
EH120Requirement.add(TC120);
|
EH120Requirement.add(TC120.getType());
|
||||||
|
|
||||||
Set<PartType> TA5Incompatibilities = new HashSet<PartType>();
|
Set<PartType> TA5Incompatibilities = new HashSet<PartType>();
|
||||||
TA5Incompatibilities.add(EG100);
|
TA5Incompatibilities.add(EG100.getType());
|
||||||
|
|
||||||
Set<PartType> TSF7Incompatibilities = new HashSet<PartType>();
|
Set<PartType> TSF7Incompatibilities = new HashSet<PartType>();
|
||||||
TSF7Incompatibilities.add(EG100);
|
TSF7Incompatibilities.add(EG100.getType());
|
||||||
TSF7Incompatibilities.add(EG133);
|
TSF7Incompatibilities.add(EG133.getType());
|
||||||
TSF7Incompatibilities.add(ED110);
|
TSF7Incompatibilities.add(ED110.getType());
|
||||||
|
|
||||||
Set<PartType> TC120Requirement = new HashSet<PartType>();
|
Set<PartType> TC120Requirement = new HashSet<PartType>();
|
||||||
TC120Requirement.add(EH120);
|
TC120Requirement.add(EH120.getType());
|
||||||
|
|
||||||
Set<PartType> XCIncompatibilities = new HashSet<PartType>();
|
Set<PartType> XCIncompatibilities = new HashSet<PartType>();
|
||||||
XCIncompatibilities.add(EG210);
|
XCIncompatibilities.add(EG210.getType());
|
||||||
|
|
||||||
Set<PartType> XMIncompatibilities = new HashSet<PartType>();
|
Set<PartType> XMIncompatibilities = new HashSet<PartType>();
|
||||||
XMIncompatibilities.add(EG100);
|
XMIncompatibilities.add(EG100.getType());
|
||||||
|
|
||||||
Set<PartType> XSIncompatibilities = new HashSet<PartType>();
|
Set<PartType> XSIncompatibilities = new HashSet<PartType>();
|
||||||
XSIncompatibilities.add(EG100);
|
XSIncompatibilities.add(EG100.getType());
|
||||||
Set<PartType> XSRequirement = new HashSet<PartType>();
|
Set<PartType> XSRequirement = new HashSet<PartType>();
|
||||||
XSRequirement.add(IS);
|
XSRequirement.add(IS.getType());
|
||||||
|
|
||||||
Set<PartType> ISIncompatibilities = new HashSet<PartType>();
|
Set<PartType> ISIncompatibilities = new HashSet<PartType>();
|
||||||
ISIncompatibilities.add(EG100);
|
ISIncompatibilities.add(EG100.getType());
|
||||||
ISIncompatibilities.add(TM5);
|
ISIncompatibilities.add(TM5.getType());
|
||||||
Set<PartType> ISRequirement = new HashSet<PartType>();
|
Set<PartType> ISRequirement = new HashSet<PartType>();
|
||||||
ISRequirement.add(XS);
|
ISRequirement.add(XS.getType());
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user