public static EventTracker<String> EVENT_TRACKER;
- private Scope _externalScope;
+ private Scope externalScope;
@Override
protected void setUp() throws Exception {
super.setUp();
EVENT_TRACKER = new EventTracker<String>();
- _externalScope = new DefaultScope(new ProvidedInterface[0]);
+ externalScope = new DefaultScope(new ProvidedInterface[0]);
}
public void testBlackboxSystem() {
new HashMap<String, ProvidedInterface>(),
new HashMap<RequiredInterface, String>());
- Scope runtime = system.start(_externalScope);
- assertEquals(0, _externalScope.getProvidedInterfaces().size());
+ Scope runtime = system.start(externalScope);
+ assertEquals(0, externalScope.getProvidedInterfaces().size());
system.stop(runtime);
}
SpringComponent system = new SpringComponent("system",
new String[] { HELLO_SERVICE_SPRING_XML }, provided,
new HashMap<RequiredInterface, String>());
- Scope runtime = system.start(_externalScope);
+ Scope runtime = system.start(externalScope);
List<ProvidedInterface> services = runtime.getProvidedInterfaces();
assertEquals(1, services.size());
// BUG; Provided services should be made available in the external
// scope.
- Object service2 = _externalScope.getInterfaceImplementation(provided
+ Object service2 = externalScope.getInterfaceImplementation(provided
.get("helloService"), Object.class);
assertSame(service, service2);
props.load(new ClassPathResource(PROPERTY_FILE).getInputStream());
system.addProperties(props);
- Scope scope = system.start(_externalScope);
+ Scope scope = system.start(externalScope);
// BUG: Hello service was constructed multiple times. Once with the
// unprocessed property
// and another time with the processed property.
props.load(new ClassPathResource(PROPERTY_FILE).getInputStream());
system.addProperties("properties", props);
- Scope scope = system.start(_externalScope);
+ Scope scope = system.start(externalScope);
List<ProvidedInterface> services = scope.getProvidedInterfaces();
new String[] { HELLO_SERVICE_SPRING_WITH_REQS_XML },
new HashMap<String, ProvidedInterface>(),
new HashMap<RequiredInterface, String>());
- system.start(_externalScope);
+ system.start(externalScope);
} catch (SystemAssemblyException e) {
// e.printStackTrace();
return;
new String[] { HELLO_SERVICE_SPRING_XML }, provided,
new HashMap<RequiredInterface, String>());
- Scope runtime = system.start(_externalScope);
+ Scope runtime = system.start(externalScope);
List<ProvidedInterface> services = runtime.getProvidedInterfaces();
assertEquals(2, services.size());
// BUG; Provided services should be made available in the external
// scope.
- Object service2 = _externalScope.getInterfaceImplementation(provided
+ Object service2 = externalScope.getInterfaceImplementation(provided
.get("helloService"), Object.class);
assertSame(service, service2);
- Object floatsvc = _externalScope.getInterfaceImplementation(system
+ Object floatsvc = externalScope.getInterfaceImplementation(system
.getProvidedInterfaces().get(1), Object.class);
assertTrue(floatsvc instanceof Float);
assertTrue((((Float) floatsvc).floatValue() - 100.345f) < 0.00001);