X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FConfigImplTest.java;h=9925c0b74a7637aa6065cca0cd7a49a7f597474f;hb=2e9a88b0478d074974818dc384ca45c2bf4fdaa5;hp=85860122b71c75bcac18fb61a6b469e000ffb780;hpb=5582d07a1ba9821cc789ea63b71f246e89d13cae;p=xmlrouter diff --git a/impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java b/impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java index 8586012..9925c0b 100644 --- a/impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java +++ b/impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java @@ -35,11 +35,9 @@ public class ConfigImplTest { } private static class MyTypeWrapper implements MyType { - private String prefix; private MyType type; - public MyTypeWrapper(String aPrefix, MyType aType) { - prefix = aPrefix; + public MyTypeWrapper(MyType aType) { type = aType; } @@ -49,7 +47,7 @@ public class ConfigImplTest { @Override public Id getId() { - return new Id(prefix + type.getId().getId()); + return type.getId(); } } @@ -63,8 +61,8 @@ public class ConfigImplTest { } @Override - public MyType wrap(String aPrefix, MyType aT) { - return new MyTypeWrapper(aPrefix, aT); + public MyType wrap(MyType aT) { + return new MyTypeWrapper(aT); } } @@ -89,8 +87,7 @@ public class ConfigImplTest { assertTrue(firstValue instanceof MyTypeWrapper); assertSame(type1, ((MyTypeWrapper) firstValue).getType()); - assertEquals(CONFIG_TYPE + "." + type1.getId().getId(), firstValue - .getId().getId()); + assertEquals(type1.getId().getId(), firstValue.getId().getId()); // add another one. MyType type2 = mock(MyType.class);