diff options
Diffstat (limited to 'keystone-model/src')
78 files changed, 475 insertions, 427 deletions
diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java index b55ef65..0ec9a1c 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("access") public class Access implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java index 1f1bf2f..6c6b536 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java @@ -18,8 +18,6 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; - public abstract class Authentication implements Serializable { private String tenantId; diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java index 019b3df..87c93ec 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java @@ -18,8 +18,8 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("endpoint") public class Endpoint implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java index b4e4a16..68ed95c 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Endpoints implements Iterable<Endpoint>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java index ba49b11..2da9408 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java @@ -18,7 +18,7 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("error") public class Error implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java index 7ae36de..8885d51 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java @@ -18,7 +18,7 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("role") public class Role implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java index 79fe04c..bc9e6a5 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Roles implements Iterable<Role>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java index c5a1650..40cdfae 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java @@ -18,7 +18,7 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("OS-KSADM:service") public class Service implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java index 99be776..a0ba675 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Services implements Iterable<Service>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java index 840d507..a8a84fd 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java @@ -18,8 +18,8 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("tenant") @JsonIgnoreProperties(ignoreUnknown=true) diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java index c7958f3..7ebb1f5 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Tenants implements Iterable<Tenant>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java index 830d3fa..bd1652e 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java @@ -22,8 +22,7 @@ package com.woorea.openstack.keystone.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("user") public class User implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java index b3013bf..4f511c1 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Users implements Iterable<User>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java index bb308f0..99c776a 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java @@ -16,8 +16,7 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java index f47a94b..f730fc0 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java @@ -16,8 +16,7 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java index 5c94d31..1c07283 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java @@ -16,8 +16,7 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java index 2281d01..c92d1da 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Authentication.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("auth") public class Authentication implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java index 7f36b15..26d0b89 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credential.java @@ -19,7 +19,7 @@ package com.woorea.openstack.keystone.v3.model; import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("credential") public class Credential { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java index 4051fa0..b0e6944 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Credentials.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Credentials implements Iterable<Credential>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java index cfb5d07..6509f79 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domain.java @@ -16,7 +16,7 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("domain") public class Domain { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java index 27765ef..32a5442 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Domains.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Domains implements Iterable<Domain>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java index 5fa9afe..5a60998 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoint.java @@ -16,8 +16,8 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("endpoint") public class Endpoint { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java index ac5f9a5..b8711d6 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Endpoints.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Endpoints implements Iterable<Endpoint>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java index ed7f3a0..7573119 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Group.java @@ -16,8 +16,8 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("group") public class Group { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java index ec9e558..2929030 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Groups.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Groups implements Iterable<Group>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java index a82d1b6..1d51d64 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policies.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Policies implements Iterable<Policy>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java index 12c6f04..777ff67 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Policy.java @@ -19,7 +19,7 @@ package com.woorea.openstack.keystone.v3.model; import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("policy") public class Policy { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java index b0f6288..5345cb8 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java @@ -16,8 +16,8 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("project") public class Project { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java index 984c4d2..bc11b9d 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Projects.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Projects implements Iterable<Project>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java index 317ea35..4407bba 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Role.java @@ -18,7 +18,7 @@ package com.woorea.openstack.keystone.v3.model; import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("role") public class Role implements Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java index bee8b66..ed0d21f 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Roles.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Roles implements Iterable<Role>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java index ff01737..713a370 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Service.java @@ -16,7 +16,7 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("service") public class Service { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java index 466817e..d9e23f1 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Services.java @@ -20,8 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.keystone.model.Service; public class Services implements Iterable<Service>, Serializable { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java index 2078804..ce38ff0 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Token.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.util.Calendar; import java.util.List; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("token") @JsonIgnoreProperties(ignoreUnknown=true) diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java index 9675ce5..91a6230 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/User.java @@ -16,8 +16,8 @@ package com.woorea.openstack.keystone.v3.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("user") public class User { diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java index 208af1a..a371018 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Users.java @@ -20,8 +20,7 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.keystone.model.User; public class Users implements Iterable<User>, Serializable { 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 { diff --git a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java index 31a1099..2779e1b 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/AuthenticationTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.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.v3.model.Authentication.Identity; import com.woorea.openstack.keystone.v3.model.Authentication.Scope; -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 +69,12 @@ public class AuthenticationTest { + "}"; 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/v3/model/CredentialTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java index b0c75b2..aaa2725 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Credential; +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.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; @@ -49,11 +50,12 @@ public class CredentialTest { + "}"; 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/v3/model/CredentialsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java index a158efb..a2e2e52 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/CredentialsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Credential; -import com.woorea.openstack.keystone.v3.model.Credentials; +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,9 +59,10 @@ public class CredentialsTest { + "}"; 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/v3/model/DomainTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java index f4e75c3..f2ea79a 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Token.Domain; -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; @@ -38,11 +39,12 @@ public class DomainTest { + " \"id\" : \"id\"," + EOL + " \"name\" : \"name\"" + EOL + "}"; - + 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/v3/model/DomainsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java index ee694d5..e517ff7 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/DomainsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Domain; -import com.woorea.openstack.keystone.v3.model.Domains; +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 DomainsTest { + "}"; 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/v3/model/EndpointTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java index 75a4441..91807cf 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Token.Service.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 org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -44,9 +45,10 @@ public class EndpointTest { + "}"; 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/v3/model/EndpointsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java index 8002b1c..ef75d1b 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/EndpointsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Endpoint; -import com.woorea.openstack.keystone.v3.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; @@ -51,9 +51,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/v3/model/GroupTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java index 75fc901..f9ee0a4 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Group; -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 GroupTest { + "}"; 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/v3/model/GroupsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java index c16c25a..eea955d 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/GroupsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Group; -import com.woorea.openstack.keystone.v3.model.Groups; +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 GroupsTest { + "}"; 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/v3/model/IdentityTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/IdentityTest.java index ba55e8b..799708f 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/IdentityTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/IdentityTest.java @@ -20,14 +20,16 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Authentication.Identity; import com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password; import com.woorea.openstack.keystone.v3.model.Authentication.Identity.Token; + 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; @@ -56,9 +58,10 @@ public class IdentityTest { + "}"; 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/v3/model/PasswordTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PasswordTest.java index d1230e2..4b2cd04 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PasswordTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PasswordTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Authentication.Identity.Password; import com.woorea.openstack.keystone.v3.model.Authentication.Identity.Password.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 org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -48,9 +49,10 @@ public class PasswordTest { + "}"; 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/v3/model/PoliciesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java index a3e8a8a..3a8dc83 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PoliciesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Policies; -import com.woorea.openstack.keystone.v3.model.Policy; +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,9 +59,10 @@ public class PoliciesTest { + "}"; 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/v3/model/PolicyTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java index 2aae601..c4f7a73 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/PolicyTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Policy; +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.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; @@ -49,11 +50,12 @@ public class PolicyTest { + "}"; 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/v3/model/ProjectTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java index 80b4122..5526ad1 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Token.Domain; import com.woorea.openstack.keystone.v3.model.Token.Project; -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; @@ -45,9 +46,10 @@ public class ProjectTest { + "}"; 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/v3/model/ProjectsTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java index 6ab1c88..3582a4a 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Project; -import com.woorea.openstack.keystone.v3.model.Projects; +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 ProjectsTest { + "}"; 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/v3/model/RoleTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java index 189205e..ad39df2 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RoleTest.java @@ -20,26 +20,25 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Token.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 org.junit.Assert; + import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.skyscreamer.jsonassert.JSONCompareMode; public class RoleTest { - private static final String EOL = System.lineSeparator(); - private static final String JSON_FULL = "{ }"; 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/v3/model/RolesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java index 6ee1b2c..cd8fbde 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/RolesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.model.Role; -import com.woorea.openstack.keystone.v3.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/v3/model/ScopeTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ScopeTest.java index 3f3708b..6beedb5 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ScopeTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ScopeTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Authentication.Scope; import com.woorea.openstack.keystone.v3.model.Authentication.Scope.Project; -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,9 +48,10 @@ public class ScopeTest { + "}"; 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/v3/model/ServiceTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java index 31430de..5edf7d6 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServiceTest.java @@ -20,13 +20,15 @@ package com.woorea.openstack.keystone.v3.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.keystone.v3.model.Token.Service; import com.woorea.openstack.keystone.v3.model.Token.Service.Endpoint; + 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 +59,10 @@ public class ServiceTest { + "}"; 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/v3/model/ServicesTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java index 28246c6..0a88d6a 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ServicesTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.keystone.v3.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.keystone.model.Service; -import com.woorea.openstack.keystone.v3.model.Services; + 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 +52,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/v3/model/TokenTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java index aabcfb7..4852e61 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/TokenTest.java @@ -20,18 +20,19 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.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 com.woorea.openstack.keystone.v3.model.Token.Domain; import com.woorea.openstack.keystone.v3.model.Token.Project; import com.woorea.openstack.keystone.v3.model.Token.Role; import com.woorea.openstack.keystone.v3.model.Token.Service; import com.woorea.openstack.keystone.v3.model.Token.User; + import java.util.Calendar; 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; @@ -105,11 +106,12 @@ public class TokenTest { + "}"; 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/v3/model/UserTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java index 061b0bc..dc144ed 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UserTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.keystone.v3.model; -import com.woorea.openstack.keystone.v3.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; @@ -48,11 +48,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/v3/model/UsersTest.java b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java index 35554bd..ab6c557 100644 --- a/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java +++ b/keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/UsersTest.java @@ -20,13 +20,14 @@ package com.woorea.openstack.keystone.v3.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.keystone.model.User; -import com.woorea.openstack.keystone.v3.model.Users; + 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 +58,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 { |