only:reducing duplication
This commit is contained in:
parent
5c8939637d
commit
cce7991e37
|
@ -46,19 +46,21 @@ public class VariableRegistryTest {
|
|||
@Test
|
||||
public void testPrepend() {
|
||||
VariableRegistry registry = new VariableRegistry();
|
||||
registry.register("key_string", "value_1");
|
||||
assertEquals("value_1", registry.get("key_string"));
|
||||
String stringKey = "key_string";
|
||||
registry.register(stringKey, "value_1");
|
||||
assertEquals("value_1", registry.get(stringKey));
|
||||
|
||||
registry.register("key_string", "value_2");
|
||||
assertEquals("value_1", registry.get("key_string"));
|
||||
registry.register(stringKey, "value_2");
|
||||
assertEquals("value_1", registry.get(stringKey));
|
||||
|
||||
registry.register("key_int", 1);
|
||||
assertEquals("1", registry.get("key_int"));
|
||||
assertEquals("1", registry.get("key_int" + _HEX_SUFFIX));
|
||||
String intKey = "key_int";
|
||||
registry.register(intKey, 1);
|
||||
assertEquals("1", registry.get(intKey));
|
||||
assertEquals("1", registry.get(intKey + _HEX_SUFFIX));
|
||||
|
||||
registry.register("key_int", 2);
|
||||
assertEquals("1", registry.get("key_int"));
|
||||
assertEquals("1", registry.get("key_int" + _HEX_SUFFIX));
|
||||
registry.register(intKey, 2);
|
||||
assertEquals("1", registry.get(intKey));
|
||||
assertEquals("1", registry.get(intKey + _HEX_SUFFIX));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue