package testing; import junit.framework.TestCase; import org.osoa.sca.CurrentCompositeContext; public class PropertyITest extends TestCase { private ABComponent abService; private CDComponent cdService; private ABCDComponent abcdService; // private PropertyService propertyService; public void testA() { assertEquals("a", abService.getA()); } public void testB() { assertEquals("b", abService.getB()); } public void testC() { assertEquals("c", cdService.getC()); } public void testC2() { assertEquals("c", cdService.getC2()); } public void testD() { assertEquals("d", cdService.getD()); } public void testF() { assertEquals("a", abService.getF()); } public void testZ() { assertEquals("z", abService.getZ()); } public void testIntValue() { assertEquals(1, abService.getIntValue()); } public void testDefaultValue() { assertEquals(1, abService.getIntValue()); } public void testDefaultValueOverride() { assertEquals(1, cdService.getOverrideValue()); } public void testNoSource() { assertEquals("aValue", cdService.getNoSource()); } public void testFileProperty() { assertEquals("fileValue", cdService.getFileProperty()); } public void testABCD() { assertEquals("a", abcdService.getA()); assertEquals("b", abcdService.getB()); assertEquals("c", abcdService.getC()); assertEquals("d", abcdService.getD()); } protected void setUp() throws Exception { super.setUp(); abService = CurrentCompositeContext.getContext().locateService(ABComponent.class, "ABComponent"); cdService = CurrentCompositeContext.getContext().locateService(CDComponent.class, "CDComponent"); abcdService = CurrentCompositeContext.getContext().locateService(ABCDComponent.class, "ABCDComponent"); // propertyService = CurrentCompositeContext.getContext().locateService(PropertyService.class, "PropertyService"); } }