Permalink
Browse files

IntMatcher added

  • Loading branch information...
1 parent d26716f commit 17e0119c4c289adcd735255ec0b95016ea00f35e Daniel Seidler @Work committed Nov 19, 2012
Showing with 48 additions and 1 deletion.
  1. +47 −0 src/main/kotlin/spec/matchers/IntMatcher.kt
  2. +1 −1 src/main/kotlin/spec/matchers/Should.kt
@@ -0,0 +1,47 @@
+package spec.matchers
+
+/**.
+ * User: Daniel Seidler
+ * Date: 15.11.12
+ * Time: 12:21
+ */
+
+class IntMatcher(target: Int, verb: Verb) : AnyMatcher<Int>(target, verb){
+
+ // greater than: target > value
+ fun gt(value: Int) {
+ greaterThan(value)
+ }
+
+ // greater than or equal: target > value
+ fun gte(value: Int) {
+ greaterOrEqualThan(value)
+ }
+
+ // less than: target > value
+ fun lt(value: Int) {
+ lessThan(value)
+ }
+
+ // less than or equal: target > value
+ fun lte(value: Int) {
+ lessOrEqualThan(value)
+ }
+
+ fun greaterThan(value: Int) {
+
+ }
+
+ fun lessThan(value: Int) {
+
+ }
+
+ fun greaterOrEqualThan(value: Int) {
+
+ }
+
+ fun lessOrEqualThan(value: Int) {
+
+ }
+
+}
@@ -20,4 +20,4 @@ public fun <R>jet.Function0<R>.should(verb: Verb): FunctionMatcher<R>{
public fun Int.should(verb: Verb) : IntMatcher {
return IntMatcher(this, verb)
-}
+}

0 comments on commit 17e0119

Please sign in to comment.