Package com.microsoft.windowsazure

Examples of com.microsoft.windowsazure.Configuration


    }

    @Test
    public void theServiceClassCanBeCreatedThroughConnectionString()
            throws Exception {
        Configuration config = newConfigurationWithConnectionString();

        ServiceBusContract service = config.create(ServiceBusContract.class);
        assertNotNull(service);
    }
View Full Code Here


public class ServiceBusConfigurationTest {
    @Test
    public void ConfigureSetsExpectedProperties() {
        // Arrange
        Configuration config = new Configuration();

        // Act
        ServiceBusConfiguration.configureWithWrapAuthentication(config,
                "alpha", "beta", "gamma", ".servicebus.windows.net/",
                "-sb.accesscontrol.windows.net/WRAPv0.9");

        // Assert
        assertEquals("https://alpha.servicebus.windows.net/",
                config.getProperty("serviceBus.uri"));
        assertEquals("https://alpha-sb.accesscontrol.windows.net/WRAPv0.9",
                config.getProperty("serviceBus.wrap.uri"));
        assertEquals("beta", config.getProperty("serviceBus.wrap.name"));
        assertEquals("gamma", config.getProperty("serviceBus.wrap.password"));
    }
View Full Code Here

    }

    @Test
    public void UsingProfileAddsPrefix() {
        // Arrange
        Configuration config = new Configuration();

        // Act
        ServiceBusConfiguration.configureWithWrapAuthentication("backup",
                config, "alpha", "beta", "gamma", ".servicebus.windows.net/",
                "-sb.accesscontrol.windows.net/WRAPv0.9");

        // Assert
        assertEquals("https://alpha.servicebus.windows.net/",
                config.getProperty("backup.serviceBus.uri"));
        assertEquals("https://alpha-sb.accesscontrol.windows.net/WRAPv0.9",
                config.getProperty("backup.serviceBus.wrap.uri"));
        assertEquals("beta", config.getProperty("backup.serviceBus.wrap.name"));
        assertEquals("gamma",
                config.getProperty("backup.serviceBus.wrap.password"));
    }
View Full Code Here

    @Before
    public void initialize() throws Exception {

        boolean testAlphaExists = false;
        Configuration config = createConfiguration();
        service = ServiceBusService.create(config);
        for (QueueInfo queue : iterateQueues(service)) {
            String queueName = queue.getPath();
            if (queueName.startsWith("Test") || queueName.startsWith("test")) {
                if (queueName.equalsIgnoreCase("TestAlpha")) {
View Full Code Here

        }
    }

    @AfterClass
    public static void cleanUpTestArtifacts() throws Exception {
        Configuration config = createConfiguration();
        ServiceBusContract service = ServiceBusService.create(config);
        for (QueueInfo queue : iterateQueues(service)) {
            String queueName = queue.getPath();
            if (queueName.startsWith("Test") || queueName.startsWith("test")) {
                service.deleteQueue(queueName);
View Full Code Here

            }
        }
    }

    protected static Configuration createConfiguration() throws Exception {
        Configuration config = Configuration.load();
        overrideWithEnv(config, ServiceBusConfiguration.CONNECTION_STRING);
        return config;
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.Configuration

Copyright © 2018 www.massapicom. 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.