[New] Added convenience method Locator.newLocatorBuilder(String...)

This commit is contained in:
Robert von Burg 2014-08-21 17:52:00 +02:00
parent a5f00f990c
commit 0fbd156929
8 changed files with 16 additions and 16 deletions

View File

@ -37,9 +37,9 @@ public class RemoveOrderCollectionCommandTest extends AbstractRealmCommandTest {
@Before
public void before() {
locators = new ArrayList<>();
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@1").build());
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@2").build());
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@3").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@1").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@2").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@3").build());
}
@Override

View File

@ -33,7 +33,7 @@ public class RemoveOrderCommandTest extends AbstractRealmCommandTest {
@Before
public void before() {
locator = Locator.newBuilder(Tags.ORDER).append("TestType").append("@3").build();
locator = Locator.newBuilder(Tags.ORDER, "TestType", "@3").build();
}
@Override

View File

@ -37,9 +37,9 @@ public class RemoveResourceCollectionCommandTest extends AbstractRealmCommandTes
@Before
public void before() {
locators = new ArrayList<>();
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("salutations").build());
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("sex").build());
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("religions").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "salutations").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "sex").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "religions").build());
}
@Override

View File

@ -33,7 +33,7 @@ public class RemoveResourceCommandTest extends AbstractRealmCommandTest {
@Before
public void before() {
locator = Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("sex").build();
locator = Locator.newBuilder(Tags.RESOURCE, "Enumeration", "sex").build();
}
@Override

View File

@ -36,9 +36,9 @@ public class RemoveOrderCollectionServiceTest extends AbstractRealmServiceTest {
RemoveOrderCollectionArg arg = new RemoveOrderCollectionArg();
ArrayList<Locator> locators = new ArrayList<>();
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@1").build());
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@2").build());
locators.add(Locator.newBuilder(Tags.ORDER).append("TestType").append("@3").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@1").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@2").build());
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@3").build());
arg.locators = locators;

View File

@ -32,7 +32,7 @@ public class RemoveOrderServiceTest extends AbstractRealmServiceTest {
RemoveOrderService svc = new RemoveOrderService();
RemoveOrderArg arg = new RemoveOrderArg();
arg.locator = Locator.newBuilder(Tags.ORDER).append("TestType").append("@3").build();
arg.locator = Locator.newBuilder(Tags.ORDER, "TestType", "@3").build();
runServiceInAllRealmTypes(svc, arg);
}

View File

@ -36,9 +36,9 @@ public class RemoveResourceCollectionServiceTest extends AbstractRealmServiceTes
RemoveResourceCollectionArg arg = new RemoveResourceCollectionArg();
ArrayList<Locator> locators = new ArrayList<>();
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("salutations").build());
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("sex").build());
locators.add(Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("religions").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "salutations").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "sex").build());
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "religions").build());
arg.locators = locators;

View File

@ -32,7 +32,7 @@ public class RemoveResourceServiceTest extends AbstractRealmServiceTest {
RemoveResourceService svc = new RemoveResourceService();
RemoveResourceArg arg = new RemoveResourceArg();
arg.locator = Locator.newBuilder(Tags.RESOURCE).append("Enumeration").append("sex").build();
arg.locator = Locator.newBuilder(Tags.RESOURCE, "Enumeration", "sex").build();
runServiceInAllRealmTypes(svc, arg);
}