← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20943: minor test fix

 

------------------------------------------------------------
revno: 20943
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-11-04 13:26:51 +0700
message:
  minor test fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java	2015-11-04 06:08:28 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/query/OperatorTest.java	2015-11-04 06:26:51 +0000
@@ -177,6 +177,16 @@
     }
 
     @Test
+    public void testILike()
+    {
+        ILike operator = new ILike( "operator" );
+
+        assertTrue( operator.test( "operator" ) );
+        assertTrue( operator.test( "OPERATOR" ) );
+        assertFalse( operator.test( "abc" ) );
+    }
+
+    @Test
     public void testLikeValidTypes()
     {
         Like operator = new Like( "operator" );
@@ -189,6 +199,16 @@
     }
 
     @Test
+    public void testLike()
+    {
+        Like operator = new Like( "operator" );
+
+        assertTrue( operator.test( "operator" ) );
+        assertFalse( operator.test( "OPERATOR" ) );
+        assertFalse( operator.test( "abc" ) );
+    }
+
+    @Test
     public void testLessEqualValidTypes()
     {
         LessEqual operator = new LessEqual( "operator" );
@@ -259,28 +279,28 @@
     {
         Null operator = new Null();
 
+        assertTrue( operator.test( null ) );
+        assertFalse( operator.test( "test" ) );
+    }
+
+    @Test
+    public void testNotNullValidTypes()
+    {
+        NotNull operator = new NotNull();
+
+        assertTrue( operator.isValid( String.class ) );
+        assertTrue( operator.isValid( Number.class ) );
+        assertTrue( operator.isValid( Date.class ) );
+        assertTrue( operator.isValid( Boolean.class ) );
+        assertFalse( operator.isValid( Collection.class ) );
+    }
+
+    @Test
+    public void testNotNull()
+    {
+        NotNull operator = new NotNull();
+
         assertFalse( operator.test( null ) );
         assertTrue( operator.test( "test" ) );
     }
-
-    @Test
-    public void testNotNullValidTypes()
-    {
-        NotNull operator = new NotNull();
-
-        assertTrue( operator.isValid( String.class ) );
-        assertTrue( operator.isValid( Number.class ) );
-        assertTrue( operator.isValid( Date.class ) );
-        assertTrue( operator.isValid( Boolean.class ) );
-        assertFalse( operator.isValid( Collection.class ) );
-    }
-
-    @Test
-    public void testNotNull()
-    {
-        NotNull operator = new NotNull();
-
-        assertTrue( operator.test( null ) );
-        assertFalse( operator.test( "test" ) );
-    }
 }