(no commit message)
[utils] / trunk / system / general / src / test / java / org / wamblee / system / core / ContainerTest.java
index 27a1937ff59f4f7e845022f1bb056397d3c3aa20..ee5b4e50b8112d14600d698ec6c56056625d81ea 100644 (file)
@@ -86,8 +86,8 @@ public class ContainerTest extends TestCase {
        }
 
        public void testEnvironmentApplication() {
-               Component environment = new Environment(_tracker);
-               Component application = new Application(_tracker);
+               Environment environment = new Environment(_tracker);
+               Application application = new Application(_tracker);
                Container container = new Container("root", new Component[] {
                                environment, application }, new ProvidedInterface[0],
                                new RequiredInterface[0]);
@@ -100,6 +100,9 @@ public class ContainerTest extends TestCase {
                assertEquals(2, envServices.length);
                ProvidedInterface[] appServices = application.getRunningInterfaces();
                assertEquals(0, appServices.length);
+               
+               assertEquals(environment.getString(), application.getString());
+               assertEquals(environment.getInteger(), application.getInteger());
 
        }
 
@@ -161,7 +164,7 @@ public class ContainerTest extends TestCase {
                        Container system = new Container("all", new Component[] {
                                        environment, application },
                                        new ProvidedInterface[] { new DefaultProvidedInterface(
-                                                       "string", String.class) },
+                                                       "float", Float.class) },
                                        new DefaultRequiredInterface[0]);
                } catch (SystemAssemblyException e) {
                        return;
@@ -190,9 +193,9 @@ public class ContainerTest extends TestCase {
                Container system = new Container("all", new Component[] { environment,
                                application }, new ProvidedInterface[0],
                                new RequiredInterface[] { new DefaultRequiredInterface(
-                                               "string", String.class) });
+                                               "float", Float.class) });
                system.getRequiredInterfaces()[0]
-                               .setProvider(new DefaultProvidedInterface("hallo", String.class));
+                               .setProvider(new DefaultProvidedInterface("hallo", Float.class));
                system.start();
                RequiredInterface[] required = system.getRequiredInterfaces();
                assertEquals(1, required.length);