Fehlermeldung angepasst und in Tests ergänzt
parent
edd69af9b8
commit
a7dd881817
|
@ -3,7 +3,7 @@ package src.utility.robot_exceptions;
|
|||
public enum robotExceptions {
|
||||
ILLEGALSTATE("ist in einem illegalen Zustand"),
|
||||
MAGICVALUE("Magic value"),
|
||||
EMPTYARRAY("leer");
|
||||
EMPTYARRAY("hat ein leeres Array bekommen.");
|
||||
|
||||
final String message;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class C3POTest {
|
|||
try{
|
||||
String solution = c3po.speak(new int[]{});
|
||||
}catch(RobotException re){
|
||||
assertEquals(0, "r2d2 leer".compareTo(re.getMessage()));
|
||||
assertEquals(0, "r2d2 hat ein leeres Array bekommen.".compareTo(re.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class C3POTest {
|
|||
|
||||
@Test
|
||||
void arrayEmptyException(){
|
||||
String expectedMessage = "Herbert leer";
|
||||
String expectedMessage = "Herbert hat ein leeres Array bekommen.";
|
||||
try{
|
||||
int[] solution = c3po.think(new int[0]);
|
||||
}catch(RobotException re){
|
||||
|
@ -166,7 +166,7 @@ class C3POTest {
|
|||
}
|
||||
@Test
|
||||
void testExceptionHistory() {
|
||||
String expectedMessage = "Herbert leer";
|
||||
String expectedMessage = "Herbert hat ein leeres Array bekommen.";
|
||||
try{
|
||||
int[] solution = c3po.think(new int[0]);
|
||||
}catch(RobotException re){
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package tests.tests;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class FactoryTest {
|
||||
|
||||
@Test
|
||||
void robotListToCollection() {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRobotList() {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void buildNewRobot() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRobotOfList() {
|
||||
}
|
||||
}
|
|
@ -48,7 +48,7 @@ class R2D2Test {
|
|||
try{
|
||||
String solution = r2d2.speak(new int[]{});
|
||||
}catch(RobotException re){
|
||||
assertEquals(0, "r2d2 leer".compareTo(re.getMessage()));
|
||||
assertEquals(0, "r2d2 hat ein leeres Array bekommen.".compareTo(re.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue