X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FSpringComponentTest.java;h=f83e2ec116a885cb7a78dd23f4f03a59e95635f9;hb=cc58fc5b498c82163904e8ccdc5eed7b96406a65;hp=c02f951ae82f63836067683e8e948a9b9d58140d;hpb=90df0a8dddc38ee5bc9b3a372af3e4d019293886;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 c02f951a..f83e2ec1 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 @@ -8,14 +8,12 @@ import java.util.Properties; import junit.framework.TestCase; import org.wamblee.io.ClassPathResource; -import org.wamblee.system.AbstractProvidedInterfaceDescriptor; -import org.wamblee.system.AbstractProvidedInterfaceDescriptor; +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.Service; -import org.wamblee.system.InterfaceDescriptor; import org.wamblee.system.ServiceRegistry; import org.wamblee.system.SystemAssemblyException; @@ -48,7 +46,7 @@ public class SpringComponentTest extends TestCase { public void testOneProvidedService() { Map provided = new HashMap(); - provided.put("helloService", new AbstractProvidedInterfaceDescriptor( + provided.put("helloService", new DefaultProvidedInterfaceDescriptor( "hello", HelloService.class)); SpringComponent system = new SpringComponent("system", _registry, @@ -65,7 +63,7 @@ public class SpringComponentTest extends TestCase { public void testWithProperties() throws IOException { Map provided = new HashMap(); - provided.put("helloService", new AbstractProvidedInterfaceDescriptor( + provided.put("helloService", new DefaultProvidedInterfaceDescriptor( "hello", HelloService.class)); SpringComponent system = new SpringComponent("system", _registry, new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML }, @@ -103,7 +101,7 @@ public class SpringComponentTest extends TestCase { new HashMap(), required); HelloService helloObject = new HelloService("ladida"); - Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject); + Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject); system.start("Bla", new Service[] { helloService } ); system.stop(); } @@ -113,7 +111,7 @@ public class SpringComponentTest extends TestCase { required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class), "helloService"); Map provided = new HashMap(); - provided.put("blaService", new AbstractProvidedInterfaceDescriptor("bla", + provided.put("blaService", new DefaultProvidedInterfaceDescriptor("bla", BlaService.class)); SpringComponent system = new SpringComponent("system", _registry, @@ -121,7 +119,7 @@ public class SpringComponentTest extends TestCase { provided, required); HelloService helloObject = new HelloService("ladida"); - Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject); + Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject); Service[] services = system.start("Bla", new Service[] { helloService } ); assertEquals(1, services.length);