1 18 package net.sf.uitags.util; 19 20 import junit.framework.TestCase; 21 import net.sf.uitags.util.UiString; 22 import net.sf.uitags.util.VelocityAdapter; 23 24 34 public class VelocityAdapterTest extends TestCase { 35 38 private VelocityAdapter velocityAdapter; 39 40 45 public static void main(String [] args) { 46 junit.textui.TestRunner.run(VelocityAdapterTest.class); 47 } 48 49 50 protected void setUp() throws Exception { 51 super.setUp(); 52 this.velocityAdapter = new VelocityAdapter(); 53 } 54 55 56 protected void tearDown() throws Exception { 57 super.tearDown(); 58 this.velocityAdapter = null; 59 } 60 61 65 public void testCreateUiString() { 66 UiString str = this.velocityAdapter.createUiString(""); 67 assertNotSame(this.velocityAdapter.createUiString(""), str); 68 } 69 70 74 public void testGetArrayLength() { 75 String [] testArray = new String [] { "a", "b", "c", "d"}; 76 assertEquals( 77 testArray.length, this.velocityAdapter.getArrayLength(testArray)); 78 } 79 } 80 | Popular Tags |