@@ -5,6 +5,14 @@ public class EscapeBot extends Bot{ | |||
super(args); | |||
} | |||
@Override | |||
protected char nextMove(View view) throws Exception { | |||
throw new Exception("Quit"); | |||
} | |||
public static void main(String args[]){ |
@@ -1,70 +0,0 @@ | |||
package Praktikum03; | |||
import org.junit.jupiter.api.Test; | |||
import static org.junit.jupiter.api.Assertions.*; | |||
class TriangleCheckerTest { | |||
@Test | |||
void checkNormalTriangle() { | |||
float a = 3.0f; | |||
float b = 4.0f; | |||
float c = 2.0f; | |||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,b,c); | |||
assertEquals(TriangleChecker.TriangleType.NORMAL, type); | |||
} | |||
@Test | |||
void checkEquilateralTriangle() { | |||
float a = 3.0f; | |||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,a,a); | |||
assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type); | |||
} | |||
@Test | |||
void checkIsoscelesTriangle() { | |||
float a = 3.0f; | |||
float b = 4.0f; | |||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,b,a); | |||
assertEquals(TriangleChecker.TriangleType.ISOSCELES, type); | |||
} | |||
@Test | |||
void checkNumbersNegative(){ | |||
float a = 5.0f; | |||
float b = -20.0f; | |||
float c = 4.0f; | |||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,b,c); | |||
assertEquals(TriangleChecker.TriangleType.NONE, type); | |||
} | |||
@Test | |||
void checkIfSideToLong(){ | |||
float a = 3.0f; | |||
float b = 20.0f; | |||
float c = 5.0f; | |||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,b,c); | |||
assertEquals(TriangleChecker.TriangleType.NONE, type); | |||
} | |||
} |
@@ -1,66 +0,0 @@ | |||
package Praktikum03; | |||
import org.junit.jupiter.api.Test; | |||
import static org.junit.jupiter.api.Assertions.*; | |||
class ZahlenfilterTest { | |||
@Test | |||
void filter() { | |||
} | |||
@Test | |||
void checkDivisibleBy5() { | |||
int i = 15; | |||
boolean result = Zahlenfilter.checkDivisibleBy5(i); | |||
assertTrue(result); | |||
} | |||
@Test | |||
void checkNotDivisibleBy5() { | |||
int i = 12; | |||
boolean result = Zahlenfilter.checkDivisibleBy5(i); | |||
assertFalse(result); | |||
} | |||
@Test | |||
void checkEndsWith9() { | |||
int i = 29; | |||
boolean result = Zahlenfilter.checkEndsWith9(i); | |||
assertTrue(result); | |||
} | |||
@Test | |||
void checkEndsNotWith9() { | |||
int i = 28; | |||
boolean result = Zahlenfilter.checkEndsWith9(i); | |||
assertFalse(result); | |||
} | |||
@Test | |||
void checkSumDivisibleBy3() { | |||
int i = 5; | |||
boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1); | |||
assertTrue(result); | |||
} | |||
@Test | |||
void checkSumNotDivisibleBy3() { | |||
int i = 3; | |||
boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1); | |||
assertFalse(result); | |||
} | |||
} |