summaryrefslogtreecommitdiffstats
path: root/openstack-client/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'openstack-client/src/test')
-rw-r--r--openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientMockUtils.java6
-rw-r--r--openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientTest.java8
2 files changed, 6 insertions, 8 deletions
diff --git a/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientMockUtils.java b/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientMockUtils.java
index 8ff2634..29580ba 100644
--- a/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientMockUtils.java
+++ b/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientMockUtils.java
@@ -63,9 +63,9 @@ public class OpenStackClientMockUtils {
return this;
}
- public <T extends OpenStackRequest> OpenStackClientMockUtils mockRequestThrow(T request, String message, int status) {
- Mockito.when(connector.request(Mockito.eq(request)))
- .thenThrow(new OpenStackResponseException(message, status));
+ public <T extends OpenStackRequest> OpenStackClientMockUtils mockRequestThrow(T request, String message,
+ int status) {
+ Mockito.when(connector.request(Mockito.eq(request))).thenThrow(new OpenStackResponseException(message, status));
return this;
}
diff --git a/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientTest.java b/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientTest.java
index 9a83903..e4a4098 100644
--- a/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientTest.java
+++ b/openstack-client/src/test/java/com/woorea/openstack/base/client/OpenStackClientTest.java
@@ -43,11 +43,9 @@ public class OpenStackClientTest {
}
private OpenStackClientConnector mockClientConnector() {
- return OpenStackClientMockUtils.getInstance()
- .mockRequestResponse(Entity.class, Entity.json(SUCCESS))
+ return OpenStackClientMockUtils.getInstance().mockRequestResponse(Entity.class, Entity.json(SUCCESS))
.mockRequestThrow(notAuthorizedRequest, "Not Authorized", OpenStackResponseStatus.NOT_AUTHORIZED)
- .mockRequestThrow(conflictRequest, "Conflict", OpenStackResponseStatus.CONFLICT)
- .getConnector();
+ .mockRequestThrow(conflictRequest, "Conflict", OpenStackResponseStatus.CONFLICT).getConnector();
}
@@ -69,4 +67,4 @@ public class OpenStackClientTest {
public void executeConflict() {
client.execute(conflictRequest);
}
-} \ No newline at end of file
+}