ConditionalTest: more tests for whereNot(), andNot() and orNot()

This commit is contained in:
Paul Campbell 2017-04-22 07:47:01 +01:00
parent dcf1847def
commit 22c23e7e4a

View file

@ -124,6 +124,16 @@ public class ConditionalTest {
thenTheThenResponseRuns();
}
@Test
public void whereNotTrueThenOtherwiseRuns() {
//when
Condition.whereNot(true)
.then(thenResponse)
.otherwise(otherwiseResponse);
//then
thenTheOtherwiseResponseRuns();
}
@Test
public void whereTrueAndNotFalseThenRuns() {
//when
@ -134,6 +144,17 @@ public class ConditionalTest {
thenTheThenResponseRuns();
}
@Test
public void whereTrueAndNotTrueThenOtherwiseRuns() {
//when
Condition.where(true)
.andNot(true)
.then(thenResponse)
.otherwise(otherwiseResponse);
//then
thenTheOtherwiseResponseRuns();
}
@Test
public void whereFalseOrNotFalseThenRuns() {
//when
@ -144,6 +165,17 @@ public class ConditionalTest {
thenTheThenResponseRuns();
}
@Test
public void whereFalseOrNotTrueThenOtherwiseRuns() {
//when
Condition.where(false)
.orNot(true)
.then(thenResponse)
.otherwise(otherwiseResponse);
//then
thenTheOtherwiseResponseRuns();
}
@Test
public void whereFalseElseTrueThenOtherwiseRuns() {
//when