[New] Added RuntimeMock.doServiceAssertResult()
This commit is contained in:
parent
0e5176df62
commit
a67e18af40
|
@ -45,7 +45,7 @@ public class StartActivityExecutionServiceTest extends RuntimeMock {
|
|||
arg.realm = "execution";
|
||||
arg.locator = activityLoc;
|
||||
|
||||
doService(cert, svc, arg);
|
||||
doServiceAssertResult(cert, svc, arg);
|
||||
|
||||
try (StrolchTransaction tx = getRealm("execution").openTx(cert, StartActivityExecutionServiceTest.class)) {
|
||||
Action action = tx.findElement(activityLoc.append("produce"));
|
||||
|
@ -72,7 +72,7 @@ public class StartActivityExecutionServiceTest extends RuntimeMock {
|
|||
arg.realm = "execution";
|
||||
arg.locator = activityLoc;
|
||||
|
||||
doService(cert, svc, arg);
|
||||
doServiceAssertResult(cert, svc, arg);
|
||||
|
||||
try (StrolchTransaction tx = getRealm("execution").openTx(cert, StartActivityExecutionServiceTest.class)) {
|
||||
Action action;
|
||||
|
@ -148,7 +148,7 @@ public class StartActivityExecutionServiceTest extends RuntimeMock {
|
|||
arg.realm = "execution";
|
||||
arg.locator = activityLoc;
|
||||
|
||||
doService(cert, svc, arg);
|
||||
doServiceAssertResult(cert, svc, arg);
|
||||
|
||||
try (StrolchTransaction tx = getRealm("execution").openTx(cert, StartActivityExecutionServiceTest.class)) {
|
||||
Action action;
|
||||
|
@ -187,7 +187,7 @@ public class StartActivityExecutionServiceTest extends RuntimeMock {
|
|||
arg.realm = "execution";
|
||||
arg.locator = activityLoc;
|
||||
|
||||
doService(cert, svc, arg);
|
||||
doServiceAssertResult(cert, svc, arg);
|
||||
|
||||
Thread.sleep(1000L);
|
||||
|
||||
|
|
|
@ -175,6 +175,12 @@ public class RuntimeMock {
|
|||
public <T extends ServiceArgument, U extends ServiceResult> U doService(Certificate certificate,
|
||||
Service<T, U> service, T argument) {
|
||||
U result = getServiceHandler().doService(certificate, service, argument);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T extends ServiceArgument, U extends ServiceResult> U doServiceAssertResult(Certificate certificate,
|
||||
Service<T, U> service, T argument) {
|
||||
U result = getServiceHandler().doService(certificate, service, argument);
|
||||
assertServiceResult(ServiceResultState.SUCCESS, result);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue