THIN-uebung2/Test/Aufgabe1_KellerautomatTest....

19 lines
537 B
Java
Raw Normal View History

2022-04-03 21:16:05 +02:00
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));
}
}
}