ProvidedInterfaceDescriptor no longer extends InterfaceDescriptor.
[utils] / system / spring / src / test / java / org / wamblee / system / spring / SpringComponentTest.java
index dc7a5845c659f68c47bbcd7db8f855bd3fa1c5b2..c02f951ae82f63836067683e8e948a9b9d58140d 100644 (file)
@@ -8,8 +8,8 @@ import java.util.Properties;
 import junit.framework.TestCase;
 
 import org.wamblee.io.ClassPathResource;
-import org.wamblee.system.AbstractInterfaceDescriptor;
-import org.wamblee.system.DefaultProvidedInterfaceDescriptor;
+import org.wamblee.system.AbstractProvidedInterfaceDescriptor;
+import org.wamblee.system.AbstractProvidedInterfaceDescriptor;
 import org.wamblee.system.DefaultRequiredInterfaceDescriptor;
 import org.wamblee.system.DefaultServiceRegistry;
 import org.wamblee.system.ProvidedInterfaceDescriptor;
@@ -48,7 +48,7 @@ public class SpringComponentTest extends TestCase {
 
        public void testOneProvidedService() {
                Map<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
-               provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
+               provided.put("helloService", new AbstractProvidedInterfaceDescriptor(
                                "hello", HelloService.class));
 
                SpringComponent system = new SpringComponent("system", _registry,
@@ -65,7 +65,7 @@ public class SpringComponentTest extends TestCase {
        
        public void testWithProperties() throws IOException {
                Map<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
-               provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
+               provided.put("helloService", new AbstractProvidedInterfaceDescriptor(
                                "hello", HelloService.class));
                SpringComponent system = new SpringComponent("system", _registry,
                                new String[] { HELLO_SERVICE_SPRING_WITH_PROPERTIES_XML },
@@ -103,7 +103,7 @@ public class SpringComponentTest extends TestCase {
                                new HashMap<String, ProvidedInterfaceDescriptor>(), required);
                
                HelloService helloObject = new HelloService("ladida"); 
-               Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
+               Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
                system.start("Bla", new Service[] { helloService } );
                system.stop();
        }
@@ -113,7 +113,7 @@ public class SpringComponentTest extends TestCase {
                required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class),
                                "helloService");
                Map<String,ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
-               provided.put("blaService", new DefaultProvidedInterfaceDescriptor("bla",
+               provided.put("blaService", new AbstractProvidedInterfaceDescriptor("bla",
                                BlaService.class));
 
                SpringComponent system = new SpringComponent("system", _registry,
@@ -121,7 +121,7 @@ public class SpringComponentTest extends TestCase {
                                provided, required);
                
                HelloService helloObject = new HelloService("ladida"); 
-               Service helloService = _registry.register(new DefaultProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
+               Service helloService = _registry.register(new AbstractProvidedInterfaceDescriptor("hello", HelloService.class), helloObject);
                Service[] services = system.start("Bla", new Service[] { helloService } );
                assertEquals(1, services.length);