diff options
Diffstat (limited to 'nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java')
-rw-r--r-- | nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java index 73f84b2..0e07453 100644 --- a/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java +++ b/nova-model/src/test/java/com/woorea/openstack/nova/model/VolumeTypesTest.java @@ -24,9 +24,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; - import java.util.List; - import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -36,15 +34,11 @@ public class VolumeTypesTest { private static final String EOL = System.lineSeparator(); - private static final String JSON_FULL = "{" + EOL - + " \"volume-types\" : [ { }, { } ]" + EOL - + "}"; + private static final String JSON_FULL = "{" + EOL + " \"volume-types\" : [ { }, { } ]" + EOL + "}"; - private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Include.NON_NULL) - .enable(SerializationFeature.INDENT_OUTPUT) - .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + private ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT).enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { @@ -60,13 +54,14 @@ public class VolumeTypesTest { public void testMethods() throws Exception { VolumeTypes volumetypes = objectMapper.readValue(JSON_FULL, VolumeTypes.class); volumetypes.toString(); - + List<VolumeType> list = volumetypes.getList(); Assert.assertNotNull(list); Assert.assertEquals(2, list.size()); - + int cnt = 0; - for (@SuppressWarnings("unused") VolumeType x : volumetypes) { + for (@SuppressWarnings("unused") + VolumeType x : volumetypes) { ++cnt; } Assert.assertEquals(2, cnt); |