示例#1
0
 @Test
 public void test_keyGetSetString_shouldPass() {
   String new_string = "some_random new key value.blub";
   Key key = Key.create(KEY_1_NAME, Key.KEY_VALUE, KEY_1_VALUE, Key.KEY_END);
   assertEquals(KEY_1_VALUE, key.getString());
   key.setString(new_string);
   assertEquals(new_string, key.getString());
 }
示例#2
0
 @Test
 public void test_keyWithBooleanValue_shouldPass() {
   Key key = Key.create(KEY_2_NAME, Key.KEY_VALUE, KEY_2_VALUE, Key.KEY_END);
   assertEquals(key.getBoolean(), false);
   key.setBoolean(true);
   assertEquals(key.getBoolean(), true);
   key.setString("false");
   assertEquals(key.getBoolean(), false);
   assertEquals(key.getString(), "false");
 }