Class CounterStorageKeyFunctionTest
- java.lang.Object
-
- net.shibboleth.idp.consent.logic.impl.CounterStorageKeyFunctionTest
-
public class CounterStorageKeyFunctionTest extends Object
Unit tests forCounterStorageKeyFunction.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.consent.flow.impl.ConsentFlowDescriptordescriptorprivate net.shibboleth.idp.consent.logic.impl.CounterStorageKeyFunctionfprivate net.shibboleth.utilities.java.support.collection.Pair<org.opensaml.profile.context.ProfileRequestContext,List<String>>inputprivate List<String>keysprivate net.shibboleth.idp.profile.context.ProfileInterceptorContextpicprivate org.opensaml.profile.context.ProfileRequestContextprcprivate RequestContextsrcprivate org.opensaml.storage.impl.MemoryStorageServicestorageService
-
Constructor Summary
Constructors Constructor Description CounterStorageKeyFunctionTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateCounter(String key, int iterations)Create counter storage records.voidsetUp()voidtestDifferentOrderCounters()voidtestMissingCounters()voidtestNoCounters()voidtestNoFlowDescriptor()voidtestNoProfileInterceptorContext()voidtestNoStorageContext()voidtestNoStorageService()voidtestNullKeysInput()voidtestNullPairInput()voidtestNullProfileRequestContextInput()voidtestSameOrderCounters()voidtestUnmodifiableInterceptorContextStrategy()voidtestUnmodifiableStorageContextStrategy()
-
-
-
Field Detail
-
src
private RequestContext src
-
prc
private org.opensaml.profile.context.ProfileRequestContext prc
-
pic
private net.shibboleth.idp.profile.context.ProfileInterceptorContext pic
-
descriptor
private net.shibboleth.idp.consent.flow.impl.ConsentFlowDescriptor descriptor
-
storageService
private org.opensaml.storage.impl.MemoryStorageService storageService
-
input
private net.shibboleth.utilities.java.support.collection.Pair<org.opensaml.profile.context.ProfileRequestContext,List<String>> input
-
f
private net.shibboleth.idp.consent.logic.impl.CounterStorageKeyFunction f
-
-
Method Detail
-
createCounter
protected void createCounter(@Nonnull String key, @Nonnull int iterations) throws IOException, InterruptedExceptionCreate counter storage records.- Parameters:
key- storage keyiterations- number of storage record versions- Throws:
IOException- if a storage service error occursInterruptedException- if thread error occurs while sleeping
-
setUp
@BeforeMethod public void setUp() throws Exception
- Throws:
Exception
-
testUnmodifiableInterceptorContextStrategy
public void testUnmodifiableInterceptorContextStrategy() throws Exception- Throws:
Exception
-
testUnmodifiableStorageContextStrategy
public void testUnmodifiableStorageContextStrategy() throws Exception- Throws:
Exception
-
testNullProfileRequestContextInput
public void testNullProfileRequestContextInput() throws Exception- Throws:
Exception
-
testNoProfileInterceptorContext
public void testNoProfileInterceptorContext() throws Exception- Throws:
Exception
-
testDifferentOrderCounters
public void testDifferentOrderCounters() throws Exception- Throws:
Exception
-
-