Exemplo n.º 1
0
 @Test
 public void test_keyGetBaseName_shouldPass() {
   Key key = Key.create(KEY_1_NAME, Key.KEY_VALUE, KEY_1_VALUE, Key.KEY_END);
   Key key2 = Key.create(KEY_2_NAME, Key.KEY_VALUE, KEY_2_VALUE, Key.KEY_END);
   assertEquals(KEY_1_NAME_PART_4, key.getBaseName());
   assertEquals(KEY_2_NAME_PART_4, key2.getBaseName());
 }
Exemplo n.º 2
0
 @Test
 public void test_keyAddBaseName_shouldPass() {
   // note: slashes in basename will be escaped
   String new_basename = "/some_random/string";
   String new_basename2 = "another_new/nice/basename";
   Key key = Key.create(KEY_1_NAME, Key.KEY_VALUE, KEY_1_VALUE, Key.KEY_END);
   key.addBaseName(new_basename);
   assertEquals(new_basename, key.getBaseName());
   key.addBaseName(new_basename2);
   assertEquals(new_basename2, key.getBaseName());
 }