Aufgabe1_KellerautomatTest erstellt.
This commit is contained in:
1 parent
7cbe6169ee
commit
5309a7a555
2 files changed
+124
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class Aufgabe1_KellerautomatTest {
|
||||
|
||||
@Test
|
||||
void calculate() {
|
||||
String[] acceptableWords = {"ZZO", "ZZOZZOO", "ZZZOO"};
|
||||
for (String word : acceptableWords) {
|
||||
assertTrue(Aufgabe1_Kellerautomat.calculate(word));
|
||||
}
|
||||
|
||||
String[] notAcceptableWords = {"ZZOO", "ZZOZZO", "ZOZ"};
|
||||
for (String word : notAcceptableWords) {
|
||||
assertFalse(Aufgabe1_Kellerautomat.calculate(word));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user