summaryrefslogtreecommitdiffstats
path: root/keystone-model
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-model')
-rw-r--r--keystone-model/src/main/java/com/woorea/openstack/keystone/v3/model/Project.java11
-rw-r--r--keystone-model/src/test/java/com/woorea/openstack/keystone/v3/model/ProjectsTest.java12
2 files changed, 18 insertions, 5 deletions
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 2f76faf..ef64152 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,6 +16,7 @@
package com.woorea.openstack.keystone.v3.model;
+import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -31,6 +32,8 @@ public class Project {
private Boolean enabled;
+ private List<String> tags;
+
public String getId() {
return id;
}
@@ -63,4 +66,12 @@ public class Project {
this.enabled = enabled;
}
+ public List<String> getTags() {
+ return tags;
+ }
+
+ public void setTags(List<String> tags) {
+ this.tags = tags;
+ }
+
}
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 f6a267e..f4d93c8 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,15 +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 java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.skyscreamer.jsonassert.JSONCompareMode;
+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;
public class ProjectsTest {
@@ -37,7 +37,8 @@ public class ProjectsTest {
private static final String JSON_FULL = "{" + EOL + " \"projects\" : [ {" + EOL + " \"id\" : \"id\"," + EOL
+ " \"name\" : \"name\"," + EOL + " \"enabled\" : false," + EOL + " \"domain_id\" : \"domainid\""
+ EOL + " }, {" + EOL + " \"id\" : \"id\"," + EOL + " \"name\" : \"name\"," + EOL
- + " \"enabled\" : false," + EOL + " \"domain_id\" : \"domainid\"" + EOL + " } ]" + EOL + "}";
+ + " \"enabled\" : false," + EOL + " \"domain_id\" : \"domainid\"," + EOL
+ + " \"tags\" : [\"someTag\"]" + EOL + " } ]" + EOL + "}";
private ObjectMapper objectMapper = new ObjectMapper().setSerializationInclusion(Include.NON_NULL)
.enable(SerializationFeature.INDENT_OUTPUT).enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
@@ -61,6 +62,7 @@ public class ProjectsTest {
List<Project> list = projects.getList();
Assert.assertNotNull(list);
Assert.assertEquals(2, list.size());
+ Assert.assertEquals("someTag", list.get(1).getTags().get(0));
int cnt = 0;
for (@SuppressWarnings("unused")