X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FSpringComponentTest.java;h=b0f7f8abd82734244288475825599f7c98523a90;hb=0af4854898104bd6322c0f22feb6dc285859f420;hp=f83e2ec116a885cb7a78dd23f4f03a59e95635f9;hpb=cc58fc5b498c82163904e8ccdc5eed7b96406a65;p=utils diff --git a/system/spring/src/test/java/org/wamblee/system/spring/SpringComponentTest.java b/system/spring/src/test/java/org/wamblee/system/spring/SpringComponentTest.java index f83e2ec1..b0f7f8ab 100644 --- a/system/spring/src/test/java/org/wamblee/system/spring/SpringComponentTest.java +++ b/system/spring/src/test/java/org/wamblee/system/spring/SpringComponentTest.java @@ -11,8 +11,8 @@ import org.wamblee.io.ClassPathResource; import org.wamblee.system.DefaultProvidedInterfaceDescriptor; import org.wamblee.system.DefaultRequiredInterfaceDescriptor; import org.wamblee.system.DefaultServiceRegistry; -import org.wamblee.system.ProvidedInterfaceDescriptor; -import org.wamblee.system.RequiredInterfaceDescriptor; +import org.wamblee.system.ProvidedInterface; +import org.wamblee.system.RequiredInterface; import org.wamblee.system.Service; import org.wamblee.system.ServiceRegistry; import org.wamblee.system.SystemAssemblyException; @@ -35,8 +35,8 @@ public class SpringComponentTest extends TestCase { public void testBlackboxSystem() { SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_XML }, - new HashMap(), - new HashMap()); + new HashMap(), + new HashMap()); system.start("Hello", new Service[0]); Service[] services = system.getRunningServices(); assertEquals(0, services.length); @@ -45,13 +45,13 @@ public class SpringComponentTest extends TestCase { } public void testOneProvidedService() { - Map provided = new HashMap(); + Map provided = new HashMap(); provided.put("helloService", new DefaultProvidedInterfaceDescriptor( "hello", HelloService.class)); SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_XML }, provided, - new HashMap()); + new HashMap()); system.start("Hello", new Service[0]); Service[] services = system.getRunningServices(); assertEquals(1, services.length); @@ -62,13 +62,13 @@ public class SpringComponentTest extends TestCase { } public void testWithProperties() throws IOException { - Map provided = new HashMap(); + Map provided = new HashMap(); provided.put("helloService", new DefaultProvidedInterfaceDescriptor( "hello", HelloService.class)); SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML }, provided, - new HashMap()); + new HashMap()); Properties props = new Properties(); props.load(new ClassPathResource(PROPERTY_FILE).getInputStream()); system.addProperties(props); @@ -82,8 +82,8 @@ public class SpringComponentTest extends TestCase { try { SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_WITH_REQS_XML }, - new HashMap(), - new HashMap()); + new HashMap(), + new HashMap()); system.start("Bla", new Service[0]); } catch (SystemAssemblyException e) { //e.printStackTrace(); @@ -93,12 +93,12 @@ public class SpringComponentTest extends TestCase { } public void testWithRequirement() { - Map required = new HashMap(); + Map required = new HashMap(); required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class), "helloService"); SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_WITH_REQS_XML }, - new HashMap(), required); + new HashMap(), required); HelloService helloObject = new HelloService("ladida"); Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject); @@ -107,10 +107,10 @@ public class SpringComponentTest extends TestCase { } public void testWithRequirementAndProvidedService() { - Map required = new HashMap(); + Map required = new HashMap(); required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class), "helloService"); - Map provided = new HashMap(); + Map provided = new HashMap(); provided.put("blaService", new DefaultProvidedInterfaceDescriptor("bla", BlaService.class));