updated coding rules.
[utils] / system / spring / src / test / java / org / wamblee / system / spring / SpringComponentTest.java
index 1cc95c11cb640e7c92ca2ab3192b7977880458ee..ff3aeb2429dcc82de2c83ffb215bbff06ea6f7a3 100644 (file)
@@ -44,13 +44,13 @@ public class SpringComponentTest extends TestCase {
 
     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() {
@@ -59,8 +59,8 @@ public class SpringComponentTest extends TestCase {
                 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);
     }
@@ -73,7 +73,7 @@ public class SpringComponentTest extends TestCase {
         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());
@@ -83,7 +83,7 @@ public class SpringComponentTest extends TestCase {
 
         // 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);
 
@@ -102,7 +102,7 @@ public class SpringComponentTest extends TestCase {
         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.
@@ -123,7 +123,7 @@ public class SpringComponentTest extends TestCase {
         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();
 
@@ -138,7 +138,7 @@ public class SpringComponentTest extends TestCase {
                     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;
@@ -208,7 +208,7 @@ public class SpringComponentTest extends TestCase {
                 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());
@@ -218,11 +218,11 @@ public class SpringComponentTest extends TestCase {
 
         // 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);