summaryrefslogtreecommitdiffstats
path: root/keystone-model/src/test/java/com/woorea/openstack/keystone/model
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-model/src/test/java/com/woorea/openstack/keystone/model')
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/AccessTest.java23
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointsTest.java19
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/ErrorTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/LinkTest.java17
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/RoleTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/RolesTest.java19
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServiceTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServicesTest.java19
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantsTest.java20
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/TokenTest.java19
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/UserTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/UsersTest.java19
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/AccessKeyTest.java21
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/ApiAccessKeyCredentialsTest.java16
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/PasswordCredentialsTest.java16
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java16
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/UsernamePasswordTest.java21
19 files changed, 196 insertions, 175 deletions
diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/AccessTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/AccessTest.java
index c6c3ec5..807c528 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/AccessTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/AccessTest.java
@@ -20,16 +20,16 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Access;
+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.keystone.model.Access.Service;
import com.woorea.openstack.keystone.model.Access.User;
-import com.woorea.openstack.keystone.model.Token;
+
import java.util.List;
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;
@@ -128,11 +128,12 @@ public class AccessTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointTest.java
index a379617..5d94b2b 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Endpoint;
-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;
@@ -46,11 +46,12 @@ public class EndpointTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointsTest.java
index a566f0f..a20e058 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointsTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/EndpointsTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Endpoint;
-import com.woorea.openstack.keystone.model.Endpoints;
+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;
@@ -55,9 +55,10 @@ public class EndpointsTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ErrorTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ErrorTest.java
index 357f9c6..c9903b9 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ErrorTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ErrorTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Error;
-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 ErrorTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/LinkTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/LinkTest.java
index a7a20b9..493abb4 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/LinkTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/LinkTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Link;
-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 LinkTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RoleTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RoleTest.java
index b93532c..739767b 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RoleTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RoleTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Role;
-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;
@@ -44,11 +44,12 @@ public class RoleTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RolesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RolesTest.java
index 98a7c79..86f64df 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RolesTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/RolesTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Role;
-import com.woorea.openstack.keystone.model.Roles;
+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;
@@ -51,9 +51,10 @@ public class RolesTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServiceTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServiceTest.java
index e6c8a28..fec059e 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServiceTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServiceTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Service;
-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;
@@ -44,11 +44,12 @@ public class ServiceTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServicesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServicesTest.java
index 28b7517..6c60bcc 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServicesTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/ServicesTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Service;
-import com.woorea.openstack.keystone.model.Services;
+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;
@@ -51,9 +51,10 @@ public class ServicesTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantTest.java
index 6ce4a11..6ddc765 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Tenant;
-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;
@@ -44,11 +44,12 @@ public class TenantTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantsTest.java
index f3d10e3..e79394e 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantsTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TenantsTest.java
@@ -20,14 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Link;
-import com.woorea.openstack.keystone.model.Tenant;
-import com.woorea.openstack.keystone.model.Tenants;
+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;
@@ -61,9 +60,10 @@ public class TenantsTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TokenTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TokenTest.java
index 65308b9..f91b97a 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TokenTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/TokenTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.Tenant;
-import com.woorea.openstack.keystone.model.Token;
+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.Calendar;
-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;
@@ -49,9 +49,10 @@ public class TokenTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UserTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UserTest.java
index 5669dab..0b7b9c1 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UserTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UserTest.java
@@ -20,11 +20,11 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.User;
-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;
@@ -47,11 +47,12 @@ public class UserTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UsersTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UsersTest.java
index acb96a3..eea318b 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UsersTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/UsersTest.java
@@ -20,13 +20,13 @@
package com.woorea.openstack.keystone.model;
-import com.woorea.openstack.keystone.model.User;
-import com.woorea.openstack.keystone.model.Users;
+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;
@@ -57,9 +57,10 @@ public class UsersTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/AccessKeyTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/AccessKeyTest.java
index 413097f..ffaae7e 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/AccessKeyTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/AccessKeyTest.java
@@ -20,12 +20,12 @@
package com.woorea.openstack.keystone.model.authentication;
-import com.woorea.openstack.keystone.model.authentication.AccessKey;
+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.keystone.model.authentication.AccessKey.ApiAccessKeyCredentials;
-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;
@@ -47,11 +47,12 @@ public class AccessKeyTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/ApiAccessKeyCredentialsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/ApiAccessKeyCredentialsTest.java
index ae63a61..4a0534c 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/ApiAccessKeyCredentialsTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/ApiAccessKeyCredentialsTest.java
@@ -20,11 +20,12 @@
package com.woorea.openstack.keystone.model.authentication;
+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.keystone.model.authentication.AccessKey.ApiAccessKeyCredentials;
-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 ApiAccessKeyCredentialsTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/PasswordCredentialsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/PasswordCredentialsTest.java
index 4c71e1c..02adcaa 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/PasswordCredentialsTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/PasswordCredentialsTest.java
@@ -20,11 +20,12 @@
package com.woorea.openstack.keystone.model.authentication;
+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.keystone.model.authentication.UsernamePassword.PasswordCredentials;
-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 PasswordCredentialsTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java
index 170f0b4..5fd13ef 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/TokenTest.java
@@ -20,11 +20,12 @@
package com.woorea.openstack.keystone.model.authentication;
+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.keystone.model.authentication.TokenAuthentication.Token;
-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;
@@ -39,9 +40,10 @@ public class TokenTest {
+ "}";
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/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/UsernamePasswordTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/UsernamePasswordTest.java
index ee98274..60d5385 100644
--- a/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/UsernamePasswordTest.java
+++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/model/authentication/UsernamePasswordTest.java
@@ -20,12 +20,12 @@
package com.woorea.openstack.keystone.model.authentication;
-import com.woorea.openstack.keystone.model.authentication.UsernamePassword;
+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.keystone.model.authentication.UsernamePassword.PasswordCredentials;
-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;
@@ -47,11 +47,12 @@ public class UsernamePasswordTest {
+ "}";
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 {