Examples of UserConfigurationFake


Examples of com.openshift.client.fakes.UserConfigurationFake

  private static final String DEVSERVER_PREFIX = "https://ec2-";

  public OpenShiftTestConfiguration() throws IOException, OpenShiftException {
    super(new SystemPropertiesFake(
        new IntegrationTestConfiguration(
            new UserConfigurationFake(
                new SystemConfigurationFake(
                    new DefaultConfiguration())))));
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_RHLOGIN, USERNAME);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration) {

      protected void initFile(Writer writer) throws IOException {
        writer.append(KEY_RHLOGIN).append('=').append(USERNAME2).append('\n');
      }

    };
    assertEquals(USERNAME2, userConfiguration.getRhlogin());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_LIBRA_SERVER, SIGLEQUOTED_LIBRA_SERVER);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration);
    assertEquals(UrlUtils.SCHEME_HTTPS + LIBRA_SERVER, userConfiguration.getLibraServer());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_LIBRA_SERVER, DOUBLEQUOTED_LIBRA_SERVER);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration);
    assertEquals(UrlUtils.SCHEME_HTTPS + LIBRA_SERVER, userConfiguration.getLibraServer());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_LIBRA_SERVER, LIBRA_SERVER);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration);
    assertEquals(UrlUtils.SCHEME_HTTPS + LIBRA_SERVER, userConfiguration.getLibraServer());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_RHLOGIN, USERNAME);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration) {

      @Override
      protected void initFile(Writer writer) throws IOException {
        writer.append(KEY_RHLOGIN).append('=').append(USERNAME2).append('\n');
      }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

      protected void init(Properties properties) {
        properties.put(KEY_RHLOGIN, USERNAME);
      }

    };
    UserConfigurationFake userConfiguration = new UserConfigurationFake(systemConfiguration) {

      @Override
      protected void initFile(Writer writer) throws IOException {
        writer.append(KEY_RHLOGIN).append('=').append(USERNAME2).append('\n');
      }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

  }

  @Test
  public void fallsBackToDefaultUrl() throws OpenShiftException, IOException {
    IOpenShiftConfiguration configuration = new EmptySystemPropertiesFake(
        new UserConfigurationFake(new SystemConfigurationFake(new DefaultConfiguration())));
    assertNotNull(configuration.getLibraServer());
    assertTrue(configuration.getLibraServer().contains(DefaultConfiguration.LIBRA_SERVER));
    assertNull(configuration.getRhlogin());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

    assertNull(configuration.getRhlogin());
  }

  @Test
  public void canReadPassword() throws OpenShiftException, IOException {
    UserConfigurationFake userConfiguration = new UserConfigurationFake() {

      protected void initFile(Writer writer) throws IOException {
        writer.append(KEY_PASSWORD).append('=').append("somePassword").append('\n');
      }

    };
    assertEquals("somePassword", userConfiguration.getPassword());
  }
View Full Code Here

Examples of com.openshift.client.fakes.UserConfigurationFake

    assertEquals("somePassword", userConfiguration.getPassword());
  }

  @Test
  public void canStripQuotesOfPassword() throws OpenShiftException, IOException {
    UserConfigurationFake userConfiguration = new UserConfigurationFake() {

      protected void initFile(Writer writer) throws IOException {
        writer.append(KEY_PASSWORD).append('=').append("'somePassword'").append('\n');
      }

    };
    assertEquals("somePassword", userConfiguration.getPassword());
  }
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.