X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=trunk%2Fsystem%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fadapters%2FClassConfigurationTest.java;h=a5cd1a09c6d337ba83c5e494b06ff1a10288b5c4;hb=51ee1c2eabf2be7a67043498a3a9ca286b7b2c17;hp=411b86f8ac0e31f3a3895ff00e107f7e185b0b86;hpb=ef85fc88f1f9f4e1d2400cbcfb7563521760ad17;p=utils diff --git a/trunk/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java b/trunk/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java index 411b86f8..a5cd1a09 100644 --- a/trunk/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java +++ b/trunk/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java @@ -31,6 +31,7 @@ public class ClassConfigurationTest extends AdapterTestCase { ConstructorConfiguration config = classConfig.getConstructorConfig() .greedy(); + ProvidedInterface provided = new DefaultProvidedInterface("arg", String.class); List required = classConfig.getRequiredInterfaces(); @@ -40,7 +41,7 @@ public class ClassConfigurationTest extends AdapterTestCase { required.get(0).setProvider(provided); - provided.publish("hello", _scope); + _scope.publishInterface(provided, "hello"); classConfig.create(_scope); AssertionUtils.assertEquals(new String[] { "x1(hello)" }, @@ -52,7 +53,7 @@ public class ClassConfigurationTest extends AdapterTestCase { ClassConfiguration classConfig = new ClassConfiguration(X7.class); classConfig.getConstructorConfig().select(Boolean.class); - classConfig.getSetterConfiguration().values("port").setValue(0, 10); + classConfig.getObjectConfig().getSetterConfig().initAllSetters().values("port").setValue(0, 10); ProvidedInterface providedBoolean = new DefaultProvidedInterface("boolean", Boolean.class); @@ -66,8 +67,8 @@ public class ClassConfigurationTest extends AdapterTestCase { required.get(0).setProvider(providedBoolean); required.get(1).setProvider(providedHost); - providedBoolean.publish(true, _scope); - providedHost.publish("host.name.org", _scope); + _scope.publishInterface(providedBoolean, true); + _scope.publishInterface(providedHost, "host.name.org"); Object obj = classConfig.create(_scope); assertTrue(obj instanceof X7);