> +
> +      HashMap<String, String> tags = new HashMap<String, String>();
> +      tags.put("tagname1", "tagvalue1");
> +
> +      ResourceGroup resourceGroup = 
> api.getResourceGroupApi(subscriptionid).create("jcloudstest", "West US", 
> tags);
> +
> +      assertEquals(resourceGroup.name(), "jcloudstest");
> +      assertEquals(resourceGroup.location(), "westus");
> +      assertEquals(resourceGroup.tags().size(), 1);
> +      assertTrue(resourceGroup.id().contains("jcloudstest"));
> +
> +      assertEquals(server.getRequestCount(), 1);
> +      assertSent(server, "PUT", requestUrl + "/jcloudstest" + version, 
> String.format("{\"location\":\"%s\", \"tags\":{\"tagname1\":\"tagvalue1\"}}", 
> "West US"));
> +   }
> +
> +   public void testGetResourceGroup() throws InterruptedException {

I personally prefer something like 
https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/handlers/DigitalOcean2ErrorHandler.java#L38
 where the response is compared to the `new 
ResourceGroupParseTest().expected()`. This approach enhances readability of the 
test, `*ParseTest` tests the domain objects and adds good documentation to 
them. Wdyt?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/250/files/f7cc1b437f11378e105bba552e3cfee9d7491872#r57514480

Reply via email to