Better solution for setting the context. The context is now known as soon as componen...
[utils] / system / general / src / test / java / org / wamblee / system / ContainerTest.java
index 33f3c00da080b6b42945fffbd9ba8098ae11b907..775e80064af58f5e797d4e45c0285efb166964a8 100644 (file)
@@ -82,7 +82,7 @@ public class ContainerTest extends TestCase {
                                environment, application }, new ProvidedInterface[0],
                                new RequiredInterface[0]);
                                
-               container.start("top");
+               container.start();
                AssertionUtils.assertEquals(new String[] { "start.environment",
                                "start.application" }, _tracker.getEvents(
                                Thread.currentThread()).toArray(new String[0]));
@@ -102,7 +102,7 @@ public class ContainerTest extends TestCase {
                                        new Component[] {
                                        application, environment }, 
                                        new ProvidedInterface[0], new RequiredInterface[0]);
-                       container.start("top");
+                       container.start();
                } catch (SystemAssemblyException e) {
                        // e.printStackTrace();
                        return;
@@ -121,7 +121,7 @@ public class ContainerTest extends TestCase {
                                application }, new ProvidedInterface[0],
                                new RequiredInterface[0]);
                assertEquals(Status.NOT_STARTED, system.getStatus());
-               system.start("root");
+               system.start();
                RequiredInterface[] required = system.getRequiredServices();
                assertEquals(0, required.length);
                ProvidedInterface[] provided = system.getProvidedServices();
@@ -170,7 +170,7 @@ public class ContainerTest extends TestCase {
                                        environment, application }, new ProvidedInterface[0],
                                        new RequiredInterface[] { new DefaultRequiredInterface(
                                                        "string", String.class) });
-                       system.start("root");
+                       system.start();
                } catch (SystemAssemblyException e) {
                        return;
                }
@@ -186,7 +186,7 @@ public class ContainerTest extends TestCase {
                                                "string", String.class) });
                system.getRequiredServices()[0]
                                .setProvider(new DefaultProvidedInterface("hallo", String.class));
-               system.start("root");
+               system.start();
                RequiredInterface[] required = system.getRequiredServices();
                assertEquals(1, required.length);
                ProvidedInterface[] provided = system.getProvidedServices();
@@ -200,7 +200,7 @@ public class ContainerTest extends TestCase {
                        Container system = new Container("all",
                                        new Component[] { application }, new ProvidedInterface[0],
                                        application.getRequiredServices());
-                       system.start("root");
+                       system.start();
                } catch (SystemAssemblyException e) {
                        return;
                }
@@ -215,13 +215,13 @@ public class ContainerTest extends TestCase {
                Container system = new Container("all",
                                new Component[] { application }, new ProvidedInterface[0],
                                application.getRequiredServices());
-               environment.start("env");
+               environment.start();
                system.getRequiredServices()[0].setProvider(environment
                                .getProvidedServices()[0]);
                system.getRequiredServices()[1].setProvider(environment
                                .getProvidedServices()[1]);
 
-               system.start("root");
+               system.start();
                RequiredInterface[] required = system.getRequiredServices();
                assertEquals(2, required.length);
                ProvidedInterface[] provided = system.getProvidedServices();
@@ -237,7 +237,7 @@ public class ContainerTest extends TestCase {
                        Container container = new Container("root", new Component[] {
                                        environment1, environment2, application },
                                        new ProvidedInterface[0], new RequiredInterface[0]);
-                       container.start("top");
+                       container.start();
 
                } catch (SystemAssemblyException e) {
                        return;
@@ -251,7 +251,7 @@ public class ContainerTest extends TestCase {
                        Container system = new Container("all",
                                        new Component[] { application }, new ProvidedInterface[0],
                                        new RequiredInterface[0]);
-                       system.start("root");
+                       system.start();
                } catch (SystemAssemblyException e) {
                        return;
                }