1 package org.apache.fulcrum.yaafi; 2 3 56 57 import junit.framework.Test; 58 import junit.framework.TestSuite; 59 60 import org.apache.fulcrum.yaafi.testcontainer.BaseUnitTest; 61 62 68 69 public class TestComponentTest extends BaseUnitTest 70 { 71 75 public TestComponentTest( String name ) 76 { 77 super(name); 78 } 79 80 81 82 protected void setUp() throws Exception 83 { 84 } 85 86 protected void tearDown() throws Exception 87 { 88 } 89 90 93 94 public static Test suite() 95 { 96 TestSuite suite= new TestSuite(); 97 98 suite.addTest( new TestComponentTest("testTestComponent") ); 99 100 return suite; 101 } 102 103 public void testTestComponent() throws Exception 104 { 105 TestComponent testComponent = (TestComponent) this.lookup( 106 TestComponent.ROLE 107 ); 108 109 testComponent.test(); 110 111 this.assertEquals( ((TestComponentImpl) testComponent).bar, "BAR" ); 112 this.assertEquals( ((TestComponentImpl) testComponent).foo, "FOO" ); 113 this.assertNotNull( ((TestComponentImpl) testComponent).appRoot ); 114 } 115 } 116 | Popular Tags |