Now the component provides read-only access to the interfaces.
[utils] / system / spring / src / test / java / org / wamblee / system / spring / SpringComponentTest.java
index 10e2ca8eb8a277b3319c9b712b48b53f3ac9a2d9..67ed048df8f19dbaed681191c855686d785486ac 100644 (file)
@@ -158,7 +158,7 @@ public class SpringComponentTest extends TestCase {
                 HelloService.class);
         Scope scope = new DefaultScope(new ProvidedInterface[] { helloService });
         scope.publishInterface(helloService, helloObject);
-        system.getRequiredInterfaces()[0].setProvider(helloService);
+        system.getRequiredInterfaces().get(0).setProvider(helloService);
 
         Scope runtime = system.start(scope);
         system.stop(runtime);
@@ -181,7 +181,7 @@ public class SpringComponentTest extends TestCase {
                 HelloService.class);
         Scope scope = new DefaultScope(new ProvidedInterface[] { helloService });
         scope.publishInterface(helloService, helloObject);
-        system.getRequiredInterfaces()[0].setProvider(helloService);
+        system.getRequiredInterfaces().get(0).setProvider(helloService);
         Scope runtime = system.start(scope);
         ProvidedInterface started = runtime.getProvidedInterfaces()[0];
 
@@ -222,7 +222,7 @@ public class SpringComponentTest extends TestCase {
         assertSame(service, service2);
 
         Object floatsvc = _externalScope.getInterfaceImplementation(system
-                .getProvidedInterfaces()[1], Object.class);
+                .getProvidedInterfaces().get(1), Object.class);
         assertTrue(floatsvc instanceof Float);
         assertTrue((((Float) floatsvc).floatValue() - 100.345f) < 0.00001);
 
@@ -251,8 +251,8 @@ public class SpringComponentTest extends TestCase {
         Scope scope = new DefaultScope(new ProvidedInterface[] { helloService });
         scope.publishInterface(helloService, helloObject);
         scope.publishInterface(floatService, 100.234f);
-        system.getRequiredInterfaces()[0].setProvider(helloService);
-        system.getRequiredInterfaces()[1].setProvider(floatService);
+        system.getRequiredInterfaces().get(0).setProvider(helloService);
+        system.getRequiredInterfaces().get(1).setProvider(floatService);
 
         Scope runtime = system.start(scope);
         system.stop(runtime);