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:06:20 GMT
> @@ -273,4 +273,36 @@ public void testSetTagsOnVirtualGuestWhenResponseIs4xx() {
>        VirtualGuest virtualGuest = createVirtualGuest();
>        assertFalse(api.getVirtualGuestApi().setTags(virtualGuest.getId(), ImmutableSet.of("test1",
"test2", "test3")));
>     }
> +
> +   public void testSetNotesOnVirtualGuestWhenResponseIs2xx() {
> +
> +      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();

Don't use a file just to store a `"true"`. Directly pass the String here.

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