1 package org.oddjob.arooa; 2 3 import junit.framework.TestCase; 4 5 8 public class BespokeBuildTest extends TestCase { 9 10 ObjectFactory factory; 11 12 public void setUp() { 13 SimpleObjectFactory factory = new SimpleObjectFactory(); 14 factory.set("a", "org.oddjob.arooa.test.A"); 15 factory.set("b", "org.oddjob.arooa.test.B"); 16 this.factory = factory; 17 } 18 19 public void testBuild() throws ArooaException { 20 BespokeBuildComponent b = new BespokeBuildComponent(); 21 22 ArooaFactory af = new ArooaFactory(); 23 af.setComponentFactory(factory); 24 af.setObjectToConfigure(b); 25 af.build(getClass().getResourceAsStream("bespoke-build-test.xml")); 26 27 assertTrue("Check return string.", b.checkString.equals("worked")); 28 } 29 30 } 31 | Popular Tags |