Operatoren + und * hinzugefügt (ohne Berechnung) in Aufgabe2_Kellerautomat

Tests in Aufgabe2
This commit is contained in:
romanschenk37
2022-04-06 23:58:57 +02:00
parent 03fc5b9712
commit 4607df33b7
2 changed files with 42 additions and 14 deletions
+14
View File
@@ -0,0 +1,14 @@
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class Aufgabe2_KellerautomatTest {
@Test
void calculate() {
assertEquals('Z', Aufgabe2_Kellerautomat.calculate("ZZ+ZZ+ZZ+ZZ+***"));
assertEquals('Z', Aufgabe2_Kellerautomat.calculate("ZZ+ZZ+ZZZ+ZZZZ++Z++++++"));
assertEquals('$', Aufgabe2_Kellerautomat.calculate("ZZ+*"));
assertEquals('$', Aufgabe2_Kellerautomat.calculate("Z+Z+Z*Z*"));
}
}