1 17 18 package org.apache.tools.ant.taskdefs.condition; 19 20 import junit.framework.TestCase; 21 22 26 public class EqualsTest extends TestCase { 27 28 public EqualsTest(String name) { 29 super(name); 30 } 31 32 public void testTrim() { 33 Equals eq = new Equals(); 34 eq.setArg1("a"); 35 eq.setArg2(" a"); 36 assertTrue(!eq.eval()); 37 38 eq.setTrim(true); 39 assertTrue(eq.eval()); 40 41 eq.setArg2("a\t"); 42 assertTrue(eq.eval()); 43 } 44 45 public void testCaseSensitive() { 46 Equals eq = new Equals(); 47 eq.setArg1("a"); 48 eq.setArg2("A"); 49 assertTrue(!eq.eval()); 50 51 eq.setCasesensitive(false); 52 assertTrue(eq.eval()); 53 } 54 55 } 56 | Popular Tags |