Examples of ProviderRegistrationResult


Examples of org.apache.qpid.client.security.DynamicSaslRegistrar.ProviderRegistrationResult

    public void testRegisterDefaultProvider()
    {
        assertNull("Provider should not yet be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));

        ProviderRegistrationResult firstRegistrationResult = DynamicSaslRegistrar.registerSaslProviders();
        assertEquals("Unexpected registration result", ProviderRegistrationResult.SUCCEEDED, firstRegistrationResult);
        assertNotNull("Providers should now be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));
    }
View Full Code Here

Examples of org.apache.qpid.client.security.DynamicSaslRegistrar.ProviderRegistrationResult

        assertNull("Provider should not yet be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));

        DynamicSaslRegistrar.registerSaslProviders();
        assertNotNull("Providers should now be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));

        ProviderRegistrationResult result = DynamicSaslRegistrar.registerSaslProviders();
        assertEquals("Unexpected registration result when trying to re-register", ProviderRegistrationResult.EQUAL_ALREADY_REGISTERED, result);
        assertNotNull("Providers should still be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));
    }
View Full Code Here

Examples of org.apache.qpid.client.security.DynamicSaslRegistrar.ProviderRegistrationResult

        Security.addProvider(testProvider);
        assertSame("Test provider should be registered", testProvider, DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));

        //Try to register the default provider now that another with the same name etc (but different factories)
        //is already registered, expect it not to be registered as a result.
        ProviderRegistrationResult result = DynamicSaslRegistrar.registerSaslProviders();
        assertEquals("Unexpected registration result", ProviderRegistrationResult.DIFFERENT_ALREADY_REGISTERED, result);

        //Verify the test provider is still registered
        assertSame("Test provider should still be registered", testProvider, DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));
    }
View Full Code Here

Examples of org.apache.qpid.client.security.DynamicSaslRegistrar.ProviderRegistrationResult

        //Adjust the location of the properties file to point at an empty file, so no factories are found to register.
        setTestSystemProperty("amq.dynamicsaslregistrar.properties", emptyTempFile.getPath());

        //Try to register the default provider, expect it it not to be registered because there were no factories.
        ProviderRegistrationResult result = DynamicSaslRegistrar.registerSaslProviders();
        assertEquals("Unexpected registration result", ProviderRegistrationResult.NO_SASL_FACTORIES, result);

        assertNull("Provider should not be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));
    }
View Full Code Here

Examples of org.apache.qpid.client.security.DynamicSaslRegistrar.ProviderRegistrationResult

        //Adjust the location of the properties file to point at non-existent file.
        setTestSystemProperty("amq.dynamicsaslregistrar.properties", tempFile.getPath());

        //Try to register the default provider, expect it to fall back to the default in the jar and succeed.
        ProviderRegistrationResult result = DynamicSaslRegistrar.registerSaslProviders();
        assertEquals("Unexpected registration result", ProviderRegistrationResult.SUCCEEDED, result);

        assertNotNull("Provider should be registered", DynamicSaslRegistrar.findProvider(JCAProvider.QPID_CLIENT_SASL_PROVIDER_NAME));
    }
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.