From 223540a48c6116041a264ba2244814b6e002f27f Mon Sep 17 00:00:00 2001 From: Noorul Islam K M Date: Fri, 20 Sep 2013 06:52:48 +0530 Subject: [PATCH] Rename test method names to reflect what is being tested. --- .../java/org/jclouds/chef/ChefApiExpectTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java index 3a7bae4ff5..c3a9372f9a 100644 --- a/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java +++ b/apis/chef/src/test/java/org/jclouds/chef/ChefApiExpectTest.java @@ -53,7 +53,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { .addHeader("Accept", MediaType.APPLICATION_JSON); } - public void testListClientsReturns2xx() { + public void testListClientsReturnsValidSet() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/clients").build()), HttpResponse.builder().statusCode(200) // @@ -64,7 +64,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(nodes.contains("adam"), String.format("Expected nodes to contain 'adam' but was: %s", nodes)); } - public void testListClientsReturns404() { + public void testListClientsReturnsEmptySetOn404() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/clients").build()), HttpResponse.builder().statusCode(404) @@ -73,7 +73,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(clients.isEmpty(), String.format("Expected clients to be empty but was: %s", clients)); } - public void testListNodesReturns2xx() { + public void testListNodesReturnsValidSet() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/nodes").build()), HttpResponse.builder().statusCode(200) @@ -84,7 +84,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes)); } - public void testListNodesReturns404() { + public void testListNodesReturnsEmptySetOn404() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/nodes").build()), HttpResponse.builder().statusCode(404).build()); @@ -92,7 +92,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(nodes.isEmpty(), String.format("Expected nodes to be empty but was: %s", nodes)); } - public void testListRecipesInEnvironmentReturns2xx() { + public void testListRecipesInEnvironmentReturnsValidSet() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()), HttpResponse.builder().statusCode(200) @@ -103,7 +103,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(recipes.contains("apache2"), String.format("Expected recipes to contain 'apache2' but was: %s", recipes)); } - public void testListRecipesInEnvironmentReturns404() { + public void testListRecipesInEnvironmentReturnsEmptySetOn404() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/environments/dev/recipes").build()), HttpResponse.builder().statusCode(404).build()); @@ -111,7 +111,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(recipes.isEmpty(), String.format("Expected recipes to be empty but was: %s", recipes)); } - public void testListNodesInEnvironmentReturns2xx() { + public void testListNodesInEnvironmentReturnsValidSet() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()), HttpResponse.builder().statusCode(200) @@ -122,7 +122,7 @@ public class ChefApiExpectTest extends BaseChefApiExpectTest { assertTrue(nodes.contains("blah"), String.format("Expected nodes to contain 'blah' but was: %s", nodes)); } - public void testListNodesInEnvironmentReturns404() { + public void testListNodesInEnvironmentReturnsEmptySetOn404() { ChefApi api = requestSendsResponse( signed(getHttpRequestBuilder("GET", "/environments/dev/nodes").build()), HttpResponse.builder().statusCode(404).build());