@Test public void testEvaluateTrue2() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); Boolean result = (Boolean) containsFunction.evaluate("not contains 2", 2); Assert.assertTrue(result); }
@Test public void testEvaluateTrue1() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); Boolean result = (Boolean) containsFunction.evaluate("another text", "another"); Assert.assertTrue(result); }
@Test public void testEvaluateFalse4() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); Boolean result = (Boolean) containsFunction.evaluate("text", "simple text"); Assert.assertFalse(result); }
@Test public void testEvaluateFalse2() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); Boolean result = (Boolean) containsFunction.evaluate(null, "not contains"); Assert.assertFalse(result); }
@Test public void testCaseInsensitiveComparison() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); Boolean result = (Boolean) containsFunction.evaluate("Some test", "Test"); Assert.assertTrue(result); }
@Test(expected = IllegalArgumentException.class) public void testEvaluateInvalid() throws Exception { ContainsFunction containsFunction = new ContainsFunction(); containsFunction.evaluate("test"); }