git://wamblee.org
/
xmlrouter
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Config no longer implements Identifiable because this was in violation of the contrac...
[xmlrouter]
/
impl
/
src
/
test
/
java
/
org
/
wamblee
/
xmlrouter
/
impl
/
ConfigImplTest.java
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 9925c0b74a7637aa6065cca0cd7a49a7f597474f..c7b1d9c8660d2d95849411741734017d20620ba0 100644
(file)
--- a/
impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java
+++ b/
impl/src/test/java/org/wamblee/xmlrouter/impl/ConfigImplTest.java
@@
-23,7
+23,6
@@
import java.util.concurrent.atomic.AtomicLong;
import org.junit.Before;
import org.junit.Test;
import org.wamblee.xmlrouter.common.Id;
import org.junit.Before;
import org.junit.Test;
import org.wamblee.xmlrouter.common.Id;
-import org.wamblee.xmlrouter.config.Config;
import org.wamblee.xmlrouter.config.Identifiable;
public class ConfigImplTest {
import org.wamblee.xmlrouter.config.Identifiable;
public class ConfigImplTest {
@@
-52,7
+51,7
@@
public class ConfigImplTest {
}
public static final class MyTypeConfig extends ConfigImpl<MyType> {
}
public static final class MyTypeConfig extends ConfigImpl<MyType> {
- public MyTypeConfig(
Id<Config>
aId) {
+ public MyTypeConfig(
String
aId) {
super(MyType.class, aId);
}
super(MyType.class, aId);
}
@@
-72,7
+71,7
@@
public class ConfigImplTest {
@Before
public void setUp() {
sequence = new AtomicLong(1L);
@Before
public void setUp() {
sequence = new AtomicLong(1L);
- config = new MyTypeConfig(
new Id<Config>(CONFIG_TYPE)
);
+ config = new MyTypeConfig(
CONFIG_TYPE
);
}
@Test
}
@Test
@@
-118,10
+117,10
@@
public class ConfigImplTest {
@Test
public void testEquals() {
@Test
public void testEquals() {
- Config<MyType> config1 = new MyTypeConfig(
new Id<Config>(CONFIG_TYPE)
);
+ Config<MyType> config1 = new MyTypeConfig(
CONFIG_TYPE
);
assertFalse(config1.equals(null));
assertFalse(config1.equals("hello"));
assertFalse(config1.equals(null));
assertFalse(config1.equals("hello"));
- Config<MyType> config2 = new MyTypeConfig(
new Id<Config>(CONFIG_TYPE)
);
+ Config<MyType> config2 = new MyTypeConfig(
CONFIG_TYPE
);
assertEquals(config1, config2);
assertEquals(config1.hashCode(), config2.hashCode());
assertEquals(config1, config2);
assertEquals(config1.hashCode(), config2.hashCode());
@@
-148,7
+147,7
@@
public class ConfigImplTest {
testAdd();
assertEquals(2, config.values().size());
MyTypeConfig copy = new MyTypeConfig(config);
testAdd();
assertEquals(2, config.values().size());
MyTypeConfig copy = new MyTypeConfig(config);
- assertEquals(config.get
Id(), config.getId
());
+ assertEquals(config.get
Prefix(), copy.getPrefix
());
assertEquals(config, copy);
// verify the copy is not shallow
assertEquals(config, copy);
// verify the copy is not shallow