my changes
parent
a7dd881817
commit
2b3ac712d8
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -11,7 +11,6 @@ public class Factory implements Serializable {
|
||||||
private int r2d2ID = 10000;
|
private int r2d2ID = 10000;
|
||||||
|
|
||||||
public Factory(){
|
public Factory(){
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @return Collection<Robot></Robot>
|
* @return Collection<Robot></Robot>
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
package tests.tests;
|
package tests.tests;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import src.domain.C3PO;
|
||||||
|
import src.domain.Factory;
|
||||||
|
import src.domain.RobotType;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
class FactoryTest {
|
class FactoryTest {
|
||||||
|
|
||||||
|
Factory f;
|
||||||
|
@BeforeEach
|
||||||
|
void setup(){
|
||||||
|
f = new Factory();
|
||||||
|
}
|
||||||
@Test
|
@Test
|
||||||
void robotListToCollection() {
|
void robotListToCollection() {
|
||||||
|
|
||||||
|
@ -18,9 +27,13 @@ class FactoryTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void buildNewRobot() {
|
void buildNewRobot() {
|
||||||
|
asserEquals(true, f.buildNewRobot("herbi", RobotType.R2D2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getRobotOfList() {
|
void getRobotOfList() {
|
||||||
|
String[] test = new String[0];
|
||||||
|
assertEquals(test, f.getRobotList());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue