[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml: attribute/resolver/imp...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Aug 8 20:21:25 EDT 2014
Author: scantor
Date: Fri Aug 8 20:21:24 2014
New Revision: 6408
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6408&view=rev
Log:
Remove implicit setId call from StorageService.
Modified:
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/resolver/impl/TransientIdAttributeDefinitionTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML1NameIdentifierGeneratorTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML2NameIDGeneratorTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/TransientDecoderTest.java
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/resolver/impl/TransientIdAttributeDefinitionTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/resolver/impl/TransientIdAttributeDefinitionTest.java?rev=6408&r1=6407&r2=6408&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/resolver/impl/TransientIdAttributeDefinitionTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/resolver/impl/TransientIdAttributeDefinitionTest.java Fri Aug 8 20:21:24 2014
@@ -31,9 +31,9 @@
import org.opensaml.core.OpenSAMLInitBaseTestCase;
import org.opensaml.storage.StorageRecord;
-import org.opensaml.storage.StorageService;
import org.opensaml.storage.impl.MemoryStorageService;
import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/** test for {@link net.shibboleth.idp.saml.attribute.resolver.impl.TransientIdAttributeDefinition}. */
@@ -46,12 +46,17 @@
private static final int TEST_ID_SIZE = 32;
+ private MemoryStorageService store;
+
+ @BeforeMethod void setUp() throws ComponentInitializationException {
+ store = new MemoryStorageService();
+ store.setId("test");
+ store.initialize();
+ }
+
@Test public void single() throws ComponentInitializationException, ResolutionException, IOException {
final StoredTransientIdGenerationStrategy strategy = new StoredTransientIdGenerationStrategy();
strategy.setId("strategy");
-
- final StorageService store = new MemoryStorageService();
- store.initialize();
strategy.setIdStore(store);
strategy.initialize();
@@ -91,8 +96,6 @@
final StoredTransientIdGenerationStrategy strategy = new StoredTransientIdGenerationStrategy();
strategy.setId("strategy");
- final StorageService store = new MemoryStorageService();
- store.initialize();
strategy.setIdStore(store);
strategy.initialize();
@@ -120,13 +123,8 @@
@Test public void testGetters() throws ComponentInitializationException {
final StoredTransientIdGenerationStrategy strategy = new StoredTransientIdGenerationStrategy();
strategy.setId("strategy");
-
- final StorageService store = new MemoryStorageService();
- store.initialize();
-
strategy.setIdLifetime(TEST_LIFETIME);
strategy.setIdSize(TEST_ID_SIZE);
-
strategy.setIdStore(store);
strategy.initialize();
final TransientIdAttributeDefinition defn = new TransientIdAttributeDefinition(strategy);
@@ -145,13 +143,8 @@
InterruptedException {
final StoredTransientIdGenerationStrategy strategy = new StoredTransientIdGenerationStrategy();
strategy.setId("strategy");
-
- final StorageService store = new MemoryStorageService();
- store.initialize();
-
strategy.setIdLifetime(TEST_LIFETIME);
strategy.setIdSize(TEST_ID_SIZE);
-
strategy.setIdStore(store);
strategy.initialize();
final TransientIdAttributeDefinition defn = new TransientIdAttributeDefinition(strategy);
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML1NameIdentifierGeneratorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML1NameIdentifierGeneratorTest.java?rev=6408&r1=6407&r2=6408&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML1NameIdentifierGeneratorTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/StoredTransientSAML1NameIdentifierGeneratorTest.java Fri Aug 8 20:21:24 2014
@@ -27,7 +27,6 @@
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.saml.saml1.core.NameIdentifier;
import org.opensaml.storage.StorageRecord;
-import org.opensaml.storage.StorageService;
[... 135 lines stripped ...]
More information about the commits
mailing list