Examples of IHttpClient


Examples of com.openshift.client.IHttpClient

  @Test
  public void shouldUpdatePropertiesWhenRefreshed() throws Throwable {
    // pre-conditions
    HttpClientMockDirector mockDirector = new HttpClientMockDirector();
    IHttpClient client = mockDirector
        .mockGetDomains(GET_DOMAINS)
        .mockGetApplications(
            "foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_3EMBEDDED)
        .mockGetApplicationCartridges(
            "foobarz", "springeap6",
View Full Code Here

Examples of com.openshift.client.IHttpClient

  private IOpenShiftConnection connection;

  @Before
  public void setup() throws Throwable {
    IHttpClient client = new HttpClientMockDirector()
        .mockGetCartridges(Samples.GET_CARTRIDGES)
        .client();
    this.connection = new TestConnectionBuilder().defaultCredentials().create(client);
  }
View Full Code Here

Examples of com.openshift.client.IHttpClient

  private IDomain domain;

  @Before
  public void setup() throws Throwable {
    IHttpClient client = new HttpClientMockDirector()
      .mockGetDomains(GET_DOMAINS)
      .mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_1EMBEDDED)
      .mockGetApplication("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_1EMBEDDED)
      .mockGetGearGroups("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_GEARGROUPS)
      .client();
View Full Code Here

Examples of com.openshift.client.IHttpClient

  private IOpenShiftConnection connection;

  @Before
  public void setUp() throws OpenShiftException, FileNotFoundException, IOException {
    IHttpClient client = new HttpClientMockDirector()
        .mockGetCartridges(Samples.GET_CARTRIDGES)
        .client();
    this.connection = new TestConnectionBuilder().defaultCredentials().create(client);
  }
View Full Code Here

Examples of com.openshift.client.IHttpClient

  private IOpenShiftConnection connection;

  @Before
  public void setup() throws Throwable {
    IHttpClient client = new HttpClientMockDirector()
        .mockGetCartridges(Samples.GET_CARTRIDGES)
        .client();
    this.connection = new TestConnectionBuilder().defaultCredentials().create(client);
  }
View Full Code Here

Examples of com.openshift.client.IHttpClient

        Properties properties = new Properties();
        properties.put(KEY_USERAGENTPATTERN, "{0} {1}");
        return properties;
      }
    };
    IHttpClient httpClientMock = mock(IHttpClient.class);

    // operation
    String clientId = "unit-test";
    new RestService("jboss.org",
        clientId,
View Full Code Here

Examples of com.openshift.client.IHttpClient

  @Test
  public void shouldDefaultTo12ProtocolVersion() throws Exception {
    // pre-condition
    RestServiceProperties properties = new RestServiceProperties();
    IHttpClient httpClientMock = mock(IHttpClient.class);

    // operation
    String clientId = "unit-test";
    new RestService(
        "jboss.org",
View Full Code Here

Examples of com.openshift.client.IHttpClient

  }

  @Test
  public void shouldSetAcceptedMediaTypeJsonToHttpClient() throws Exception {
    // pre-condition
    IHttpClient httpClientMock = mock(IHttpClient.class);
    RestServiceProperties properties = new RestServiceProperties();

    // operation
    new RestService(
        "jboss.org",
View Full Code Here

Examples of com.openshift.client.IHttpClient

  @Test
  public void shouldUseGivenProtocolVersion() throws Exception {
    // pre-condition
    RestServiceProperties properties = new RestServiceProperties();
    IHttpClient httpClientMock = mock(IHttpClient.class);

    // operation
    String clientId = "unit-test";
    new RestService(
        "jboss.org",
View Full Code Here

Examples of com.openshift.client.IHttpClient

  @Test
  public void shouldLoadEmptyListOfDomains() throws Throwable {
    // pre-conditions
    HttpClientMockDirector mockBuilder = new HttpClientMockDirector();
    IHttpClient clientMock =  mockBuilder.mockGetDomains(GET_DOMAINS_EMPTY).client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(clientMock).getUser();
    // operation
    final List<IDomain> domains = user.getDomains();
    // verifications
    assertThat(domains).hasSize(0);
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.