git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[maven-release-plugin] prepare for next development iteration
[utils]
/
system
/
general
/
src
/
test
/
java
/
org
/
wamblee
/
system
/
adapters
/
ClassConfigurationTest.java
diff --git
a/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java
b/system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java
index c0fc039815aab0d7963c30ce055128686a941d20..da5ff6f83834adc6c76ea2f502a0614bd4eda6f8 100644
(file)
--- a/
system/general/src/test/java/org/wamblee/system/adapters/ClassConfigurationTest.java
+++ b/
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();
ConstructorConfiguration config = classConfig.getConstructorConfig()
.greedy();
+
ProvidedInterface provided = new DefaultProvidedInterface("arg",
String.class);
List<RequiredInterface> required = classConfig.getRequiredInterfaces();
ProvidedInterface provided = new DefaultProvidedInterface("arg",
String.class);
List<RequiredInterface> required = classConfig.getRequiredInterfaces();
@@
-40,8
+41,8
@@
public class ClassConfigurationTest extends AdapterTestCase {
required.get(0).setProvider(provided);
required.get(0).setProvider(provided);
-
provided.publish("hello", _scope
);
- classConfig.create(
_
scope);
+
scope.publishInterface(provided, "hello"
);
+ classConfig.create(scope);
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
AdapterTestCase.EVENT_TRACKER.getEvents(Thread.currentThread())
AssertionUtils.assertEquals(new String[] { "x1(hello)" },
AdapterTestCase.EVENT_TRACKER.getEvents(Thread.currentThread())
@@
-52,7
+53,7
@@
public class ClassConfigurationTest extends AdapterTestCase {
ClassConfiguration classConfig = new ClassConfiguration(X7.class);
classConfig.getConstructorConfig().select(Boolean.class);
ClassConfiguration classConfig = new ClassConfiguration(X7.class);
classConfig.getConstructorConfig().select(Boolean.class);
- classConfig.getObjectConfig().getSetterConfig().
values("p
ort").setValue(0, 10);
+ classConfig.getObjectConfig().getSetterConfig().
initAllSetters().values("setP
ort").setValue(0, 10);
ProvidedInterface providedBoolean = new DefaultProvidedInterface("boolean",
Boolean.class);
ProvidedInterface providedBoolean = new DefaultProvidedInterface("boolean",
Boolean.class);
@@
-66,10
+67,10
@@
public class ClassConfigurationTest extends AdapterTestCase {
required.get(0).setProvider(providedBoolean);
required.get(1).setProvider(providedHost);
required.get(0).setProvider(providedBoolean);
required.get(1).setProvider(providedHost);
-
providedBoolean.publish(true, _scop
e);
-
providedHost.publish("host.name.org", _scope
);
+
scope.publishInterface(providedBoolean, tru
e);
+
scope.publishInterface(providedHost, "host.name.org"
);
- Object obj = classConfig.create(
_
scope);
+ Object obj = classConfig.create(scope);
assertTrue(obj instanceof X7);
X7 x7 = (X7)obj;
assertNotNull(x7.getBoolean());
assertTrue(obj instanceof X7);
X7 x7 = (X7)obj;
assertNotNull(x7.getBoolean());
@@
-77,7
+78,7
@@
public class ClassConfigurationTest extends AdapterTestCase {
assertNull(x7.getHost());
assertNull(x7.getPort());
assertNull(x7.getHost());
assertNull(x7.getPort());
- classConfig.inject(
_
scope, obj);
+ classConfig.inject(scope, obj);
assertEquals("host.name.org", x7.getHost());
assertEquals(10, x7.getPort().intValue());
assertEquals("host.name.org", x7.getHost());
assertEquals(10, x7.getPort().intValue());