Class CounterStorageKeyFunctionTest


  • public class CounterStorageKeyFunctionTest
    extends Object
    Unit tests for CounterStorageKeyFunction.
    • Field Detail

      • 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
    • Constructor Detail

      • CounterStorageKeyFunctionTest

        public CounterStorageKeyFunctionTest()
    • Method Detail

      • createCounter

        protected void createCounter​(@Nonnull
                                     String key,
                                     @Nonnull
                                     int iterations)
                              throws IOException,
                                     InterruptedException
        Create counter storage records.
        Parameters:
        key - storage key
        iterations - number of storage record versions
        Throws:
        IOException - if a storage service error occurs
        InterruptedException - if thread error occurs while sleeping
      • 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
      • testNoFlowDescriptor

        public void testNoFlowDescriptor()
                                  throws Exception
        Throws:
        Exception
      • testNoStorageService

        public void testNoStorageService()
                                  throws Exception
        Throws:
        Exception
      • testNoStorageContext

        public void testNoStorageContext()
                                  throws Exception
        Throws:
        Exception
      • testSameOrderCounters

        public void testSameOrderCounters()
                                   throws Exception
        Throws:
        Exception
      • testDifferentOrderCounters

        public void testDifferentOrderCounters()
                                        throws Exception
        Throws:
        Exception
      • testMissingCounters

        public void testMissingCounters()
                                 throws Exception
        Throws:
        Exception