git://wamblee.org
/
xmlrouter
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added copying of SingleRouterConfig.
[xmlrouter]
/
impl
/
src
/
test
/
java
/
org
/
wamblee
/
xmlrouter
/
impl
/
CompositeConfigTest.java
diff --git
a/impl/src/test/java/org/wamblee/xmlrouter/impl/CompositeConfigTest.java
b/impl/src/test/java/org/wamblee/xmlrouter/impl/CompositeConfigTest.java
index 1f17b68e7c85ce81717305a01844910bc7525d96..9905046d9463998e38f5cb5c4e92cf487b4a3a6a 100644
(file)
--- a/
impl/src/test/java/org/wamblee/xmlrouter/impl/CompositeConfigTest.java
+++ b/
impl/src/test/java/org/wamblee/xmlrouter/impl/CompositeConfigTest.java
@@
-60,24
+60,23
@@
public class CompositeConfigTest {
@Test
public void testEmptyConfig() {
@Test
public void testEmptyConfig() {
- Config<IntClass> composite = composite("c");
- assertEquals(id("c"), composite.getId());
+ Config<IntClass> composite = composite();
assertTrue(composite.values().isEmpty());
}
@Test(expected = RuntimeException.class)
public void testAddNotAllowed() {
assertTrue(composite.values().isEmpty());
}
@Test(expected = RuntimeException.class)
public void testAddNotAllowed() {
- composite(
"c"
).add(new IntClass(10));
+ composite().add(new IntClass(10));
}
@Test(expected = RuntimeException.class)
public void testRemoveNotAllowed() {
}
@Test(expected = RuntimeException.class)
public void testRemoveNotAllowed() {
- composite(
"c"
).remove(new Id<IntClass>("xxx"));
+ composite().remove(new Id<IntClass>("xxx"));
}
@Test
public void testAddConfig() {
}
@Test
public void testAddConfig() {
- CompositeConfig<IntClass> composite = composite(
"c"
);
+ CompositeConfig<IntClass> composite = composite();
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
@@
-118,7
+117,7
@@
public class CompositeConfigTest {
@Test(expected = ConfigException.class)
public void testDuplicatesNotAllowed() {
@Test(expected = ConfigException.class)
public void testDuplicatesNotAllowed() {
- CompositeConfig<IntClass> composite = composite(
"c"
);
+ CompositeConfig<IntClass> composite = composite();
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
@@
-137,7
+136,7
@@
public class CompositeConfigTest {
@Test
public void testDuplicateItem() {
@Test
public void testDuplicateItem() {
- CompositeConfig<IntClass> composite = composite(
"c"
);
+ CompositeConfig<IntClass> composite = composite();
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
Config<IntClass> c1 = new ConfigImpl(id("c1")) {
@Override
public Identifiable wrap(String aPrefix, Identifiable aT) {
@@
-166,8
+165,8
@@
public class CompositeConfigTest {
assertTrue(composite.values().contains(i1));
}
assertTrue(composite.values().contains(i1));
}
- private CompositeConfig<IntClass> composite(
String aId
) {
- return new CompositeConfig<IntClass>(
id(aId)
);
+ private CompositeConfig<IntClass> composite() {
+ return new CompositeConfig<IntClass>();
}
private Id<Config> id(String aId) {
}
private Id<Config> id(String aId) {