1 4 package com.tc.config.schema.dynamic; 5 6 import org.apache.xmlbeans.XmlObject; 7 8 import com.tc.config.schema.MockXmlObject; 9 import com.tc.config.schema.context.MockConfigContext; 10 import com.tc.test.TCTestCase; 11 12 15 public abstract class XPathBasedConfigItemTestBase extends TCTestCase { 16 17 protected MockConfigContext context; 18 protected String xpath; 19 20 protected MockXmlObject bean; 21 protected MockXmlObject subBean; 22 23 protected void setUp() throws Exception { 24 this.context = new MockConfigContext(); 25 this.xpath = "foobar/baz"; 26 27 this.bean = new MockXmlObject(); 28 this.context.setReturnedBean(this.bean); 29 30 this.subBean = createSubBean(); 31 this.bean.setReturnedSelectPath(new XmlObject[] { this.subBean }); 32 } 33 34 protected abstract MockXmlObject createSubBean() throws Exception ; 35 36 } 37 | Popular Tags |