jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds] [Softlayer] Implements setting and retrieving the notes property (#756)
Date Wed, 03 Jun 2015 00:04:35 GMT
> +      HttpRequest setNodesOnVirtualGuest = HttpRequest.builder().method("POST")
> +              .endpoint("https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/1301396/editObject")
> +              .addHeader("Accept", "application/json")
> +              .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==")
> +              .payload(payloadFromResourceWithContentType("/virtual_guest_set_notes.json",
MediaType.APPLICATION_JSON))
> +              .build();
> +
> +      HttpResponse setNotesOnVirtualGuestResponse = HttpResponse.builder().statusCode(200)
> +              .payload(payloadFromResource("/virtual_guest_set_notes_response.json")).build();
> +
> +      SoftLayerApi api = requestSendsResponse(setNodesOnVirtualGuest, setNotesOnVirtualGuestResponse);
> +      VirtualGuest virtualGuest = createVirtualGuest();
> +      assertTrue(api.getVirtualGuestApi().setNotes(virtualGuest.getId(), "some notes"));
> +   }
> +
> +   public void testSetNotesOnVirtualGuestWhenResponseIs4xx() {

Remove this test once the fallback has been removed.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/756/files#r31583731
Mime
View raw message