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