> @@ -156,6 +158,33 @@ public void testListNodesInEnvironmentReturns404() {
>        assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty 
> but was: %s", nodes));
>     }
>  
> +   public void testListCookbooksInEnvironmentReturns2xx() {
> +      ChefApi api = requestSendsResponse(
> +            signed(HttpRequest.builder() //
> +                  .method("GET") //
> +                  
> .endpoint("http://localhost:4000/environments/dev/cookbooks";) //
> +                  .addHeader("X-Chef-Version", 
> ChefApiMetadata.DEFAULT_API_VERSION) //
> +                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), 
> //
> +            HttpResponse.builder().statusCode(200)
> +                  
> .payload(payloadFromResourceWithContentType("/env_cookbooks.json", 
> MediaType.APPLICATION_JSON)) //
> +                  .build());
> +      Set<CookbookDefinition> cookbooks = 
> api.listCookbooksInEnvironment("dev");
> +      assertEquals(cookbooks.size(), 2);
> +   }
> +
> +   public void testListCookbooksInEnvironmentReturns404() {

Could we rename this to indicate what it's actually testing? E.g. 
"testListCookbooks404ReturnsEmptyCollection" or "...ReturnsNull" or whatever..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/24/files#r6428008

Reply via email to