=== 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" ) ); - } }