예제 #1
0
 public void test_prefix() {
   UniqueIdSupplier test = new UniqueIdSupplier("Prefixing");
   assertEquals(UniqueId.parse("Prefixing~A-1"), test.getWithValuePrefix("A-"));
   assertEquals(UniqueId.parse("Prefixing~A-2"), test.getWithValuePrefix("A-"));
   assertEquals(UniqueId.parse("Prefixing~B-3"), test.getWithValuePrefix("B-"));
 }
예제 #2
0
 public void test_toString() {
   UniqueIdSupplier test = new UniqueIdSupplier("Prefixing");
   assertEquals(true, test.toString().contains("Prefixing"));
 }
예제 #3
0
 public void test_basics() {
   UniqueIdSupplier test = new UniqueIdSupplier("Scheme");
   assertEquals(UniqueId.parse("Scheme~1"), test.get());
   assertEquals(UniqueId.parse("Scheme~2"), test.get());
   assertEquals(UniqueId.parse("Scheme~3"), test.get());
 }