- Environment environment = new Environment(_tracker);
- Application 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]);
Scope scope = container.start();
assertTrue(container.isSealed());
AssertionUtils.assertEquals(new String[] { "start.environment",
Container container = new Container("root", new Component[] {
environment, application }, new ProvidedInterface[0],
new RequiredInterface[0]);
Scope scope = container.start();
assertTrue(container.isSealed());
AssertionUtils.assertEquals(new String[] { "start.environment",
Thread.currentThread()).toArray(new String[0]));
assertEquals(0, scope.getProvidedInterfaces().size());
Thread.currentThread()).toArray(new String[0]));
assertEquals(0, scope.getProvidedInterfaces().size());
- Environment environment = new Environment(_tracker);
- Application application = new Application(_tracker);
+ Environment environment = new Environment(tracker);
+ Application application = new Application(tracker);
Container container = new Container("root").addComponent(environment)
.addComponent(application);
Scope scope = container.start();
AssertionUtils.assertEquals(new String[] { "start.environment",
Container container = new Container("root").addComponent(environment)
.addComponent(application);
Scope scope = container.start();
AssertionUtils.assertEquals(new String[] { "start.environment",
Thread.currentThread()).toArray(new String[0]));
assertEquals(0, scope.getProvidedInterfaces().size());
Thread.currentThread()).toArray(new String[0]));
assertEquals(0, scope.getProvidedInterfaces().size());
- Component<?> environment = new Environment(_tracker);
- Component<?> application = new Application(_tracker);
- assertEquals(0, _tracker.getEventCount());
+ Component<?> environment = new Environment(tracker);
+ Component<?> application = new Application(tracker);
+ assertEquals(0, tracker.getEventCount());
Container system = new Container("all", new Component[] { environment,
application }, new ProvidedInterface[0],
Container system = new Container("all", new Component[] { environment,
application }, new ProvidedInterface[0],
assertEquals(0, provided.size());
AssertionUtils.assertEquals(new String[] { "start.environment",
assertEquals(0, provided.size());
AssertionUtils.assertEquals(new String[] { "start.environment",
container.start();
} catch (RuntimeException e) {
AssertionUtils.assertEquals(new String[] { "start.environment",
container.start();
} catch (RuntimeException e) {
AssertionUtils.assertEquals(new String[] { "start.environment",
// Application 1 will throw an exception while stopping.
Application application1 = new Application("app1") {
@Override
// Application 1 will throw an exception while stopping.
Application application1 = new Application("app1") {
@Override
container.start();
} catch (RuntimeException e) {
AssertionUtils.assertEquals(new String[] { "start.environment",
container.start();
} catch (RuntimeException e) {
AssertionUtils.assertEquals(new String[] { "start.environment",
Container envcontainer = new Container("0").addComponent(env)
.addProvidedInterface(
new DefaultProvidedInterface("string", String.class))
Container envcontainer = new Container("0").addComponent(env)
.addProvidedInterface(
new DefaultProvidedInterface("string", String.class))
Scope scope = envcontainer.start();
AssertionUtils.assertEquals(new String[] { "start.environment" },
Scope scope = envcontainer.start();
AssertionUtils.assertEquals(new String[] { "start.environment" },
Container envcontainer = new Container("0").addComponent(env)
.addProvidedInterface(
new DefaultProvidedInterface("string", String.class))
.addProvidedInterface(
new DefaultProvidedInterface("integer", Integer.class));
Container envcontainer = new Container("0").addComponent(env)
.addProvidedInterface(
new DefaultProvidedInterface("string", String.class))
.addProvidedInterface(
new DefaultProvidedInterface("integer", Integer.class));
Container appcontainer = new Container("1").addComponent(app)
.addRequiredInterface(
new DefaultRequiredInterface("string", String.class))
Container appcontainer = new Container("1").addComponent(app)
.addRequiredInterface(
new DefaultRequiredInterface("string", String.class))