Package com.openshift.client.utils

Examples of com.openshift.client.utils.OpenShiftTestConfiguration


*/
public class PayLoadReturningHttpClientFake extends UrlConnectionHttpClient {

  public PayLoadReturningHttpClientFake(String mediaType, String version) throws FileNotFoundException, IOException,
      OpenShiftException {
    this(new OpenShiftTestConfiguration(), mediaType, version);
  }
View Full Code Here


  }
 
  @Test(expected = InvalidCredentialsOpenShiftException.class)
  public void shouldThrowIfInvalidCredentials() throws Exception {
    // dont test on dev server
    OpenShiftTestConfiguration configuration = new OpenShiftTestConfiguration();
    if (configuration.isDevelopmentServer()) {
      throw new InvalidCredentialsOpenShiftException(null, new HttpClientException(""), null);
    }

    new TestConnectionBuilder()
      .credentials(configuration.getClientId(), "bogus-password").create().getUser()
  }
View Full Code Here

        .mockPostAny(jsonResponse)
        .mockPutAny(jsonResponse)
        .mockDeleteAny(jsonResponse)
        .client();

    OpenShiftTestConfiguration configuration = new OpenShiftTestConfiguration();
    this.service = new RestService(
        configuration.getStagingServer(),
        configuration.getClientId(),
        new JsonMediaType(),
        IHttpClient.MEDIATYPE_APPLICATION_JSON,
        new OpenShiftJsonDTOFactory(),
        clientMock);
  }
View Full Code Here

  public void shouldReturnPlatformWithSchema() throws Exception {
    // pre-conditions
    final String serverUrl = "nonHttpUrl";
    IRestService service = new RestService(
        serverUrl,
        new OpenShiftTestConfiguration().getClientId(),
        new JsonMediaType(),
        IHttpClient.MEDIATYPE_APPLICATION_JSON,
        new OpenShiftJsonDTOFactory(),
        clientMock);
    // operation
View Full Code Here

  public void shouldReturnUnchangedPlatformUrl() throws Exception {
    // pre-conditions
    final String serverUrl = "http://fakeUrl";
    IRestService service = new RestService(
        serverUrl,
        new OpenShiftTestConfiguration().getClientId(),
        new JsonMediaType(),
        IHttpClient.MEDIATYPE_APPLICATION_JSON,
        new OpenShiftJsonDTOFactory(),
        clientMock);
    // operation
View Full Code Here

TOP

Related Classes of com.openshift.client.utils.OpenShiftTestConfiguration

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.