1 18 package net.sf.uitags.util; 19 20 import javax.servlet.jsp.JspException ; 21 22 import junit.framework.TestCase; 23 24 30 public final class PropertyUtilsTest extends TestCase { 31 35 private String beanUnderTest; 36 39 private String dummyPropertyName; 40 41 46 public static void main(String [] args) { 47 junit.textui.TestRunner.run(PropertyUtilsTest.class); 48 } 49 50 51 protected void setUp() throws Exception { 52 super.setUp(); 53 this.beanUnderTest = "dummyBean"; 54 this.dummyPropertyName = "dummyPropertyName"; 55 } 56 57 58 protected void tearDown() throws Exception { 59 super.tearDown(); 60 this.beanUnderTest = null; 61 this.dummyPropertyName = null; 62 } 63 64 68 public void testGetSimpleProperty() { 69 try { 70 PropertyUtils.getSimpleProperty( 71 this.beanUnderTest, this.dummyPropertyName); 72 } 73 catch (JspException e) { 74 } 76 } 77 78 82 public void testGetProperty() { 83 try { 84 PropertyUtils.getProperty(this.beanUnderTest, this.dummyPropertyName); 85 } 86 catch (JspException e) { 87 } 89 } 90 } 91 | Popular Tags |