correction @Before test
This commit is contained in:
@@ -5,6 +5,7 @@ import java.util.HashSet;
|
|||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import src.fr.impl.*;
|
import src.fr.impl.*;
|
||||||
@@ -12,7 +13,7 @@ import src.fr.api.*;
|
|||||||
|
|
||||||
|
|
||||||
public class test {
|
public class test {
|
||||||
public static void main(String[] args){
|
|
||||||
Category Engine = new CategoryImpl("Engine");
|
Category Engine = new CategoryImpl("Engine");
|
||||||
Category Transmission = new CategoryImpl("Transmission");
|
Category Transmission = new CategoryImpl("Transmission");
|
||||||
Category Exterior= new CategoryImpl("Exterior");
|
Category Exterior= new CategoryImpl("Exterior");
|
||||||
@@ -43,6 +44,10 @@ public class test {
|
|||||||
|
|
||||||
CompatibilityManager cm = new CompatibilityManagerImpl();
|
CompatibilityManager cm = new CompatibilityManagerImpl();
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void init(){
|
||||||
|
|
||||||
|
|
||||||
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
Set<PartType> EH120Requirement = new HashSet<PartType>();
|
||||||
EH120Requirement.add(TC120);
|
EH120Requirement.add(TC120);
|
||||||
|
|
||||||
@@ -91,13 +96,19 @@ public class test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test(){
|
public void test_1_Incompatibilities(){
|
||||||
assertTrue(true);
|
assertTrue(cm.getIncompatibilities(EH120).contains(TC120));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test2(){
|
public void test_multiple_Incompatibilities(){
|
||||||
assertEquals(1,1); //very Important test
|
assertTrue(
|
||||||
|
cm.getIncompatibilities(TSF7).contains(EG100)&&
|
||||||
|
cm.getIncompatibilities(TSF7).contains(EG133)&&
|
||||||
|
cm.getIncompatibilities(TSF7).contains(ED110)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user