- Revision
- 709
- Author
- sirenian
- Date
- 2007-03-22 09:09:30 -0500 (Thu, 22 Mar 2007)
Log Message
[EK] And a couple more missing behaviours.
Modified Paths
Diff
Modified: trunk/core/src/behaviour/org/jbehave/core/UsingMatchersBehaviour.java (708 => 709)
--- trunk/core/src/behaviour/org/jbehave/core/UsingMatchersBehaviour.java 2007-03-22 14:06:33 UTC (rev 708) +++ trunk/core/src/behaviour/org/jbehave/core/UsingMatchersBehaviour.java 2007-03-22 14:09:30 UTC (rev 709) @@ -107,10 +107,16 @@ } } - public void shouldProvideMatchersForOneOrAnotherCondition() throws Exception { + public void shouldProvideConditionalMatchers() throws Exception { UsingMatchers m = new UsingMatchers() {}; - Ensure.that(true, m.or(m.eq(true), m.eq(false))); - Ensure.that(false, m.either(m.eq(true), m.eq(false))); + String horse = "horse"; + String cow = "cow"; + + Ensure.that(horse, m.or(m.eq(horse), m.eq(cow))); + Ensure.that(cow, m.either(m.eq(horse), m.eq(cow))); + + Ensure.that(horse, m.and(m.eq(horse), m.contains("ors"))); + Ensure.that(cow, m.both(m.eq(cow), m.endsWith("ow"))); } }
To unsubscribe from this list please visit: