summaryrefslogtreecommitdiffstats
path: root/quantum-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'quantum-model/src/test')
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/BindingTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/GatewayInfoTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/HostRouteTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpTest.java16
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpVersionTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworkTest.java23
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworksTest.java19
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/NeutronErrorTest.java21
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/PoolTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortTest.java22
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortsTest.java19
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForAddInterfaceTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForCreateTest.java24
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterInterfaceTest.java18
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterTest.java24
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/RoutersTest.java19
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/SegmentTest.java17
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java23
-rw-r--r--quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java19
19 files changed, 193 insertions, 173 deletions
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/BindingTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/BindingTest.java
index b99c167..0fe28bc 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/BindingTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/BindingTest.java
@@ -20,12 +20,14 @@
package com.woorea.openstack.quantum.model;
+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 com.woorea.openstack.quantum.model.Port.Binding;
+
import java.util.Map;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -50,9 +52,10 @@ public class BindingTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/GatewayInfoTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/GatewayInfoTest.java
index 3e8c37f..92e8692 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/GatewayInfoTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/GatewayInfoTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.GatewayInfo;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -39,9 +39,10 @@ public class GatewayInfoTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/HostRouteTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/HostRouteTest.java
index bfa7280..063014e 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/HostRouteTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/HostRouteTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.HostRoute;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -40,9 +40,10 @@ public class HostRouteTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpTest.java
index 79fbff5..799a0f5 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpTest.java
@@ -20,11 +20,12 @@
package com.woorea.openstack.quantum.model;
+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 com.woorea.openstack.quantum.model.Port.Ip;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -40,9 +41,10 @@ public class IpTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpVersionTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpVersionTest.java
index b2a8604..b58aed5 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpVersionTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/IpVersionTest.java
@@ -20,12 +20,12 @@
package com.woorea.openstack.quantum.model;
+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 com.woorea.openstack.quantum.model.Subnet.IpVersion;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.junit.Assert;
+
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.skyscreamer.jsonassert.JSONCompareMode;
@@ -37,9 +37,10 @@ public class IpVersionTest {
private static final String JSON_FULL = "4";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworkTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworkTest.java
index b9d5b37..7a2b2c1 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworkTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworkTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Network;
-import com.woorea.openstack.quantum.model.Segment;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -59,11 +59,12 @@ public class NetworkTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworksTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworksTest.java
index dd39cf5..9b4dc3b 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworksTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NetworksTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Network;
-import com.woorea.openstack.quantum.model.Networks;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -77,9 +77,10 @@ public class NetworksTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NeutronErrorTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NeutronErrorTest.java
index a0031ee..e2dc7f5 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NeutronErrorTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/NeutronErrorTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.NeutronError;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -43,11 +43,12 @@ public class NeutronErrorTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PoolTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PoolTest.java
index c2cf38e..ce7574b 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PoolTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PoolTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Pool;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -40,9 +40,10 @@ public class PoolTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortTest.java
index 756753d..b8a7a34 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortTest.java
@@ -20,14 +20,15 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Port;
+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 com.woorea.openstack.quantum.model.Port.Binding;
import com.woorea.openstack.quantum.model.Port.Ip;
+
import java.util.List;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -69,11 +70,12 @@ public class PortTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortsTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortsTest.java
index 860ea7c..62e5c3b 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortsTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/PortsTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Port;
-import com.woorea.openstack.quantum.model.Ports;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -95,9 +95,10 @@ public class PortsTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForAddInterfaceTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForAddInterfaceTest.java
index 148637f..270b7a2 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForAddInterfaceTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForAddInterfaceTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.RouterForAddInterface;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -40,9 +40,10 @@ public class RouterForAddInterfaceTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForCreateTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForCreateTest.java
index f7df840..b84e639 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForCreateTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterForCreateTest.java
@@ -20,14 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.GatewayInfo;
-import com.woorea.openstack.quantum.model.HostRoute;
-import com.woorea.openstack.quantum.model.RouterForCreate;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -58,11 +57,12 @@ public class RouterForCreateTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterInterfaceTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterInterfaceTest.java
index 24713b7..ee4e08b 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterInterfaceTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterInterfaceTest.java
@@ -20,12 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.RouterInterface;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.junit.Assert;
+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 org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.skyscreamer.jsonassert.JSONCompareMode;
@@ -42,9 +41,10 @@ public class RouterInterfaceTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterTest.java
index 2ad549c..b75cac8 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RouterTest.java
@@ -20,14 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.GatewayInfo;
-import com.woorea.openstack.quantum.model.HostRoute;
-import com.woorea.openstack.quantum.model.Router;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -58,11 +57,12 @@ public class RouterTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RoutersTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RoutersTest.java
index ad955c8..168dffc 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RoutersTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/RoutersTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Router;
-import com.woorea.openstack.quantum.model.Routers;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -73,9 +73,10 @@ public class RoutersTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SegmentTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SegmentTest.java
index 9bc7fd7..992d5ab 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SegmentTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SegmentTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Segment;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+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 org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -41,9 +41,10 @@ public class SegmentTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
index 5e1c7e1..9bdd37c 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetTest.java
@@ -20,14 +20,14 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Pool;
-import com.woorea.openstack.quantum.model.Subnet;
+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 com.woorea.openstack.quantum.model.Subnet.IpVersion;
+
import java.util.List;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -59,11 +59,12 @@ public class SubnetTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .setSerializationInclusion(Include.NON_NULL)
+ .enable(SerializationFeature.INDENT_OUTPUT)
+ .enable(SerializationFeature.WRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.UNWRAP_ROOT_VALUE)
+ .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
+ .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
@Test
public void testSerialization() throws Exception {
diff --git a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
index d01d3f6..710f694 100644
--- a/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
+++ b/quantum-model/src/test/java/com/woorea/openstack/quantum/model/SubnetsTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.quantum.model;
-import com.woorea.openstack.quantum.model.Subnet;
-import com.woorea.openstack.quantum.model.Subnets;
+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.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
@@ -75,9 +75,10 @@ public class SubnetsTest {
+ "}";
private ObjectMapper objectMapper = new ObjectMapper()
- .setSerializationInclusion(Inclusion.NON_NULL)
- .enable(SerializationConfig.Feature.INDENT_OUTPUT)
- .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ .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 {