correction PartTypeImpl
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
package src.fr.impl;
|
package src.fr.impl;
|
||||||
|
|
||||||
public class PartType implements src.fr.api.PartType {
|
public class PartTypeImpl implements src.fr.api.PartType {
|
||||||
private String name;
|
private String name;
|
||||||
private Category category;
|
private Category category;
|
||||||
|
|
||||||
public PartType(String name, Category category ) {
|
public PartTypeImpl(String name, Category category ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import static org.junit.Assert.*;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import src.fr.impl.*;
|
import src.fr.impl.*;
|
||||||
|
import src.fr.api.PartType;
|
||||||
|
|
||||||
public class test {
|
public class test {
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
@@ -17,27 +18,27 @@ public class test {
|
|||||||
Category Interior= new Category("Interior");
|
Category Interior= new Category("Interior");
|
||||||
|
|
||||||
//PartType
|
//PartType
|
||||||
PartType EG100= new PartType("EG100", Engine);
|
PartType EG100= new PartTypeImpl("EG100", Engine);
|
||||||
PartType EG133= new PartType("EG133", Engine);
|
PartType EG133= new PartTypeImpl("EG133", Engine);
|
||||||
PartType EG210= new PartType("EG210", Engine);
|
PartType EG210= new PartTypeImpl("EG210", Engine);
|
||||||
PartType ED110= new PartType("ED110", Engine);
|
PartType ED110= new PartTypeImpl("ED110", Engine);
|
||||||
PartType ED180= new PartType("ED180", Engine);
|
PartType ED180= new PartTypeImpl("ED180", Engine);
|
||||||
PartType EH120= new PartType("EH120", Engine);
|
PartType EH120= new PartTypeImpl("EH120", Engine);
|
||||||
|
|
||||||
PartType TM5= new PartType("TM5", Transmission);
|
PartType TM5= new PartTypeImpl("TM5", Transmission);
|
||||||
PartType TM6= new PartType("TM6", Transmission);
|
PartType TM6= new PartTypeImpl("TM6", Transmission);
|
||||||
PartType TA5= new PartType("TA5", Transmission);
|
PartType TA5= new PartTypeImpl("TA5", Transmission);
|
||||||
PartType TS6= new PartType("TS6", Transmission);
|
PartType TS6= new PartTypeImpl("TS6", Transmission);
|
||||||
PartType TSF7= new PartType("TSF7", Transmission);
|
PartType TSF7= new PartTypeImpl("TSF7", Transmission);
|
||||||
PartType TC120= new PartType("TC120", Transmission);
|
PartType TC120= new PartTypeImpl("TC120", Transmission);
|
||||||
|
|
||||||
PartType XC= new PartType("XC", Exterior);
|
PartType XC= new PartTypeImpl("XC", Exterior);
|
||||||
PartType XM= new PartType("XM", Exterior);
|
PartType XM= new PartTypeImpl("XM", Exterior);
|
||||||
PartType XS= new PartType("XS", Exterior);
|
PartType XS= new PartTypeImpl("XS", Exterior);
|
||||||
|
|
||||||
PartType IN= new PartType("IN", Interior);
|
PartType IN= new PartTypeImpl("IN", Interior);
|
||||||
PartType IH= new PartType("IH", Interior);
|
PartType IH= new PartTypeImpl("IH", Interior);
|
||||||
PartType IS= new PartType("IS", Interior);
|
PartType IS= new PartTypeImpl("IS", Interior);
|
||||||
|
|
||||||
CompatibilityManager cm = new CompatibilityManager();
|
CompatibilityManager cm = new CompatibilityManager();
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ public class test {
|
|||||||
Set<PartType> ISRequirement = new HashSet<PartType>();
|
Set<PartType> ISRequirement = new HashSet<PartType>();
|
||||||
ISRequirement.add(XS);
|
ISRequirement.add(XS);
|
||||||
|
|
||||||
cm.addRequirements(EH120, (HashSet<PartType>) EH120Requirement);
|
cm.addRequirements(EH120, EH120Requirement);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user