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