implémentation des tests
This commit is contained in:
BIN
lib/hamcrest-core-1.3.jar
Normal file
BIN
lib/hamcrest-core-1.3.jar
Normal file
Binary file not shown.
BIN
lib/junit-4.13.2.jar
Normal file
BIN
lib/junit-4.13.2.jar
Normal file
Binary file not shown.
@@ -1,5 +1,12 @@
|
||||
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){
|
||||
@@ -16,8 +23,67 @@ public class test {
|
||||
PartType ED180= new PartType("ED180", Engine);
|
||||
PartType EH120= new PartType("EH120", Engine);
|
||||
|
||||
//Transmission
|
||||
PartType TM5= new PartType("TM5", 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,EH120Requirement);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
assertTrue(true);
|
||||
}
|
||||
@Test
|
||||
public void test2(){
|
||||
assertEquals(1,1); //very Important test
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user