From f49f113b708ca6a9843b57058c61f65ac3646627 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 25 Nov 2013 18:53:53 +0100 Subject: [PATCH] [New] Implemented EMPTY and TRANSIENT dataStoreModes. Refactored Agent to be responsible for starting the container. And it requires the runtime configuration. --- .../li/strolch/service/test/GreetingServiceTest.java | 11 +++++++++-- .../config/StrolchConfiguration.xml | 1 + .../config/StrolchConfiguration.xml | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/test/java/li/strolch/service/test/GreetingServiceTest.java b/src/test/java/li/strolch/service/test/GreetingServiceTest.java index 9a1f32b3f..2a4f11602 100644 --- a/src/test/java/li/strolch/service/test/GreetingServiceTest.java +++ b/src/test/java/li/strolch/service/test/GreetingServiceTest.java @@ -27,6 +27,8 @@ import li.strolch.service.test.GreetingService.GreetingArgument; import org.junit.Test; +import ch.eitchnet.privilege.model.Certificate; + /** * @author Robert von Burg */ @@ -39,7 +41,12 @@ public class GreetingServiceTest extends AbstractServiceTest { GreetingArgument greetingArgument = new GreetingArgument(); greetingArgument.name = "Robert"; //$NON-NLS-1$ - GreetingResult greetingResult = serviceHandler.doService(null, greetingService, greetingArgument); - assertThat(greetingResult.getGreeting(), containsString("Hello Robert. Nice to meet you!")); //$NON-NLS-1$ + Certificate certificate = getPrivilegeHandler().authenticate("jill", "jill".getBytes()); //$NON-NLS-1$//$NON-NLS-2$ + try { + GreetingResult greetingResult = serviceHandler.doService(certificate, greetingService, greetingArgument); + assertThat(greetingResult.getGreeting(), containsString("Hello Robert. Nice to meet you!")); //$NON-NLS-1$ + } finally { + getPrivilegeHandler().invalidateSession(certificate); + } } } diff --git a/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml b/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml index fc75c2c82..fb9ed15a5 100644 --- a/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml +++ b/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml @@ -3,6 +3,7 @@ StrolchPersistenceTest + EMPTY true diff --git a/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml b/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml index 86fd69ae1..76e96a2c8 100644 --- a/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml +++ b/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml @@ -3,6 +3,7 @@ StrolchPersistenceTest + EMPTY true