Examples of AuthenticationManagerFactory


Examples of org.apache.qpid.server.plugin.AuthenticationManagerFactory

    }

    public void testAlreadyInitialisedAuthManagersAreClosedWhenAnotherAuthManagerInitFails() throws Exception
    {
        AuthenticationManager authManger1 = mock(MockAuthenticationManager1.class);
        AuthenticationManagerFactory authManager1Factory = newMockFactoryProducing(authManger1);

        AuthenticationManager authManager2 = mock(MockAuthenticationManager2.class);
        AuthenticationManagerFactory authManagerFactory2 = newMockFactoryProducing(authManager2);

        List<AuthenticationManagerFactory> factoryList = Arrays.asList(authManager1Factory, authManagerFactory2);
        when(_authManagerServiceLoader.atLeastOneInstanceOf(AuthenticationManagerFactory.class)).thenReturn(factoryList);

        doThrow(new RuntimeException("mock auth manager 2 init exception")).when(authManager2).initialise();
View Full Code Here

Examples of org.apache.qpid.server.plugin.AuthenticationManagerFactory

    }


    private AuthenticationManagerFactory newMockFactoryProducing(AuthenticationManager myAuthManager)
    {
        AuthenticationManagerFactory myAuthManagerFactory = mock(AuthenticationManagerFactory.class);
        when(myAuthManagerFactory.createInstance(_securityCommonsConfig)).thenReturn(myAuthManager);
        return myAuthManagerFactory;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.