> @@ -483,6 +484,19 @@ public void testListNodesInEnvironment() {
>        assertTrue(!nodeList.isEmpty());
>     }
>  
> +   @Test(dependsOnMethods = "testCreateNewCookbook")
> +   public void testListCookbooksInEnvironment() throws Exception {
> +      Set<CookbookDefinition> cookbooks = 
> api.listCookbooksInEnvironment("_default");
> +      assertNotNull(cookbooks);
> +      CookbookDefinition cookbook = cookbooks.iterator().next();
> +      String cookbookName = cookbook.getName();
> +      assertNotNull(cookbookName);
> +      assertEquals(cookbookName, PREFIX);

This live test could be executed in any environment. Are we sure that the first 
cookbook returned will be the one created by this class? Can we assert instead 
that the returned set "contains" that cookbook?
Also, add a proper message to the assertions.

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

Reply via email to