예제 #1
0
  @Test
  public void testEvaluateTrue2() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    Boolean result = (Boolean) containsFunction.evaluate("not contains 2", 2);

    Assert.assertTrue(result);
  }
예제 #2
0
  @Test
  public void testEvaluateTrue1() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    Boolean result = (Boolean) containsFunction.evaluate("another text", "another");

    Assert.assertTrue(result);
  }
예제 #3
0
  @Test
  public void testEvaluateFalse4() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    Boolean result = (Boolean) containsFunction.evaluate("text", "simple text");

    Assert.assertFalse(result);
  }
예제 #4
0
  @Test
  public void testEvaluateFalse2() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    Boolean result = (Boolean) containsFunction.evaluate(null, "not contains");

    Assert.assertFalse(result);
  }
예제 #5
0
  @Test
  public void testCaseInsensitiveComparison() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    Boolean result = (Boolean) containsFunction.evaluate("Some test", "Test");

    Assert.assertTrue(result);
  }
예제 #6
0
  @Test(expected = IllegalArgumentException.class)
  public void testEvaluateInvalid() throws Exception {
    ContainsFunction containsFunction = new ContainsFunction();

    containsFunction.evaluate("test");
  }