Package com.microsoft.windowsazure

Examples of com.microsoft.windowsazure.Configuration


    protected static ManagementClient managementClient;
    protected static String smLocation = null;

    protected static void createService() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();
        config.setProperty(ApacheConfigurationProperties.PROPERTY_RETRY_HANDLER, new DefaultHttpRequestRetryHandler());

        // add LoggingFilter to any pipeline that is created
        Registry builder = (Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here


public class ManagementClientTests extends ManagementIntegrationTestBase {
    @Test
    public void createWithRequestFilterLast() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        managementClient = ManagementService.create(config);
       
        TestRequestFilter testFilter = new TestRequestFilter("filter1a");
        ManagementClient filteredService = managementClient.withRequestFilterLast(testFilter);
View Full Code Here

    }
   
    @Test
    public void createWithRequestLastRespectsOrder() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

    }
   
    @Test
    public void createWithRequestFirstRespectsOrder() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

    }
   
    @Test
    public void createWithResponseLastRespectsOrder() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

    }
   
    @Test
    public void createWithResponseFirstRespectsOrder() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

    }
   
    @Test
    public void getCredential() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

    }
   
    @Test
    public void getUri() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();
        config.setProperty(ManagementConfiguration.URI, null);

        // add LoggingFilter to any pipeline that is created
        Builder.Registry builder = (Builder.Registry) config.getBuilder();
        builder.alter(ManagementClient.class, Client.class, new Builder.Alteration<Client>() {
            @Override
            public Client alter(String profile, Client client, Builder builder, Map<String, Object> properties) {
                client.addFilter(new LoggingFilter());
                return client;
View Full Code Here

        String file = getClass().getResource("v1.publishsettings").getFile();
        String expectedKeyStoreLocation = System.getProperty("user.home") + File.separator
                + ".azure" + File.separator + "1234.out";

        // Act
        Configuration config = PublishSettingsLoader
                .createManagementConfiguration(file, "1234");

        // Assert
        assertEquals("subscriptionId", "1234",
                config.getProperty(ManagementConfiguration.SUBSCRIPTION_ID));
        assertEquals("keyStoreLocation", expectedKeyStoreLocation,
                config.getProperty(ManagementConfiguration.KEYSTORE_PATH));
        assertEquals("keyStorePassword", "",
                config.getProperty(ManagementConfiguration.KEYSTORE_PASSWORD));
    }
View Full Code Here

        String file = getClass().getResource("v2.publishsettings").getFile();
        String expectedKeyStoreLocation = System.getProperty("user.home") + File.separator
                + ".azure" + File.separator + "2345.out";

        // Act
        Configuration config = PublishSettingsLoader
                .createManagementConfiguration(file, "2345");

        // Assert
        assertEquals("subscriptionId", "2345",
                config.getProperty(ManagementConfiguration.SUBSCRIPTION_ID));
        assertEquals("keyStoreLocation", expectedKeyStoreLocation,
                config.getProperty(ManagementConfiguration.KEYSTORE_PATH));
        assertEquals("keyStorePassword", "",
                config.getProperty(ManagementConfiguration.KEYSTORE_PASSWORD));
    }
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.