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-")); }
public void test_toString() { UniqueIdSupplier test = new UniqueIdSupplier("Prefixing"); assertEquals(true, test.toString().contains("Prefixing")); }
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()); }