ConditionalTest: more tests for whereNot(), andNot() and orNot()
This commit is contained in:
parent
dcf1847def
commit
22c23e7e4a
1 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue