(no commit message)
[utils] / system / spring / src / test / java / org / wamblee / system / spring / SpringComponentTest.java
index f83e2ec116a885cb7a78dd23f4f03a59e95635f9..b0f7f8abd82734244288475825599f7c98523a90 100644 (file)
@@ -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<String, ProvidedInterfaceDescriptor>(),
-                               new HashMap<RequiredInterfaceDescriptor, String>());
+                               new HashMap<String, ProvidedInterface>(),
+                               new HashMap<RequiredInterface, String>());
                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<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
+               Map<String, ProvidedInterface> provided = new HashMap<String, ProvidedInterface>();
                provided.put("helloService", new DefaultProvidedInterfaceDescriptor(
                                "hello", HelloService.class));
 
                SpringComponent system = new SpringComponent("system", _registry,
                                new String[] { HELLO_SERVICE_SPRING_XML }, provided,
-                               new HashMap<RequiredInterfaceDescriptor, String>());
+                               new HashMap<RequiredInterface, String>());
                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<String, ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
+               Map<String, ProvidedInterface> provided = new HashMap<String, ProvidedInterface>();
                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<RequiredInterfaceDescriptor, String>());
+                               new HashMap<RequiredInterface, String>());
                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<String, ProvidedInterfaceDescriptor>(),
-                                       new HashMap<RequiredInterfaceDescriptor, String>());
+                                       new HashMap<String, ProvidedInterface>(),
+                                       new HashMap<RequiredInterface, String>());
                        system.start("Bla", new Service[0]);
                } catch (SystemAssemblyException e) {
                        //e.printStackTrace();
@@ -93,12 +93,12 @@ public class SpringComponentTest extends TestCase {
        }
 
        public void testWithRequirement() {
-               Map<RequiredInterfaceDescriptor, String> required = new HashMap<RequiredInterfaceDescriptor, String>();
+               Map<RequiredInterface, String> required = new HashMap<RequiredInterface, String>();
                required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class),
                                "helloService");
                SpringComponent system = new SpringComponent("system", _registry,
                                new String[] { HELLO_SERVICE_SPRING_WITH_REQS_XML },
-                               new HashMap<String, ProvidedInterfaceDescriptor>(), required);
+                               new HashMap<String, ProvidedInterface>(), 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<RequiredInterfaceDescriptor, String> required = new HashMap<RequiredInterfaceDescriptor, String>();
+               Map<RequiredInterface, String> required = new HashMap<RequiredInterface, String>();
                required.put(new DefaultRequiredInterfaceDescriptor("hello", HelloService.class),
                                "helloService");
-               Map<String,ProvidedInterfaceDescriptor> provided = new HashMap<String, ProvidedInterfaceDescriptor>();
+               Map<String,ProvidedInterface> provided = new HashMap<String, ProvidedInterface>();
                provided.put("blaService", new DefaultProvidedInterfaceDescriptor("bla",
                                BlaService.class));