Skip to content
Browse files

Should Tests added

  • Loading branch information...
1 parent 0e51804 commit c2ef14c59d87642777eb3791e6cb291da697e014 @danseid committed Nov 21, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/test/kotlin/ShouldTest.kt
View
17 src/test/kotlin/ShouldTest.kt
@@ -27,6 +27,23 @@ public class ShouldTest {
}
test fun shouldBeStringMatcher() {
+ assertTrue(String().should(be) is AnyBeMatcher<String>)
+ assertTrue(String().should(!be) is AnyNotBeMatcher<String>)
+ assertTrue(String().should(contain) is StringContainMatcher)
+ assertTrue(String().should(!contain) is StringNotContainMatcher)
+ assertTrue(String().should(start) is StringStartMatcher)
+ assertTrue(String().should(!start) is StringNotStartMatcher)
+ assertTrue(String().should(end) is StringEndMatcher)
+ assertTrue(String().should(!end) is StringNotEndMatcher)
+ assertTrue(String().should(have) is StringHaveMatcher)
+ assertTrue(String().should(!have) is StringNotHaveMatcher)
+ }
+
+ test fun shouldBeFunctionMatcher() {
+ assertTrue({}.should(fail) is FunctionFailMatcher<Unit>)
+ assertTrue({}.should(!fail) is FunctionNotFailMatcher<Unit>)
+ assertTrue({"string"}.should(fail) is FunctionFailMatcher<String>)
+ assertTrue({"string"}.should(!fail) is FunctionNotFailMatcher<String>)
}
}

0 comments on commit c2ef14c

Please sign in to comment.
Something went wrong with that request. Please try again.