2020-04-17 12:27:52 +02:00
|
|
|
package condition;
|
2020-04-18 22:16:49 +02:00
|
|
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
2020-04-17 12:27:52 +02:00
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
import main.Joueur;
|
|
|
|
|
|
|
|
class ConditionMultipleTest {
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void conditionMultipleVideRenvoieTrue() {
|
|
|
|
|
|
|
|
Condition condition = new ConditionMultiple();
|
2020-04-18 22:16:49 +02:00
|
|
|
Joueur j = new Joueur(null);
|
2020-04-17 12:27:52 +02:00
|
|
|
|
|
|
|
assertTrue(condition.isTrue(j));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void conditionMultipleORVideRenvoieFalse() {
|
|
|
|
|
|
|
|
Condition condition = new ConditionMultipleOR();
|
2020-04-18 22:16:49 +02:00
|
|
|
Joueur j = new Joueur(null);
|
2020-04-17 12:27:52 +02:00
|
|
|
|
|
|
|
assertFalse(condition.isTrue(j));
|
|
|
|
}
|
2020-04-18 22:16:49 +02:00
|
|
|
|
2020-04-17 12:27:52 +02:00
|
|
|
}
|