1 18 package net.sf.uitags.util; 19 20 import javax.servlet.jsp.JspException ; 21 22 import net.sf.uitags.util.BeanUtils; 23 24 25 import junit.framework.TestCase; 26 27 33 public final class BeanUtilsTest extends TestCase { 34 38 private String beanUnderTest; 39 42 private String dummyPropertyName; 43 44 49 public static void main(String [] args) { 50 junit.textui.TestRunner.run(BeanUtilsTest.class); 51 } 52 53 54 protected void setUp() throws Exception { 55 super.setUp(); 56 this.beanUnderTest = "dummyBean"; 57 this.dummyPropertyName = "dummyPropertyName"; 58 } 59 60 61 protected void tearDown() throws Exception { 62 super.tearDown(); 63 this.beanUnderTest = null; 64 this.dummyPropertyName = null; 65 } 66 67 71 public void testGetSimpleProperty() { 72 try { 73 BeanUtils.getSimpleProperty(this.beanUnderTest, this.dummyPropertyName); 74 } 75 catch (JspException e) { 76 } 78 } 79 80 84 public void testGetProperty() { 85 try { 86 BeanUtils.getProperty(this.beanUnderTest, this.dummyPropertyName); 87 } 88 catch (JspException e) { 89 } 91 } 92 } 93 | Popular Tags |