summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomer.java11
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java2
-rw-r--r--server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerServiceTest.java4
3 files changed, 13 insertions, 4 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomer.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomer.java
index e0511e18..cc37d18b 100644
--- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomer.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomer.java
@@ -27,15 +27,19 @@ public class AAICustomer {
private String subscriberName;
private String subscriberType;
+
+ private String resourceVersion;
@JsonCreator
public AAICustomer(
@JsonProperty("global-customer-id") String globalCustomerId,
@JsonProperty("subscriber-name") String subscriberName,
- @JsonProperty("subscriber-type") String subscriberType) {
+ @JsonProperty("subscriber-type") String subscriberType,
+ @JsonProperty("resource-version") String resourceVersion) {
this.globalCustomerId = globalCustomerId;
this.subscriberName = subscriberName;
this.subscriberType = subscriberType;
+ this.resourceVersion = resourceVersion;
}
@JsonProperty("global-customer-id")
@@ -52,4 +56,9 @@ public class AAICustomer {
public String getSubscriberType() {
return subscriberType;
}
+
+ @JsonProperty("resource-version")
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
}
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
index 85f5e1fd..db8806fc 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/domain/aai/bean/AAICustomerTest.java
@@ -52,7 +52,7 @@ public class AAICustomerTest {
@Test
public void testAAICustomer() throws Exception {
- AAICustomer ac = new AAICustomer("globalCustomerId", "subscriberName", "subscriberType");
+ AAICustomer ac = new AAICustomer("globalCustomerId", "subscriberName", "subscriberType","resourceVersion");
ac.getGlobalCustomerId();
ac.getSubscriberName();
ac.getSubscriberType();
diff --git a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerServiceTest.java b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerServiceTest.java
index 16a34abb..8bdd2539 100644
--- a/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerServiceTest.java
+++ b/server/src/test/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerServiceTest.java
@@ -47,7 +47,7 @@ public class DefaultCustomerServiceTest {
@Test
public void itCanRetrieveCustomersFromAAI() {
- List<AAICustomer> customers = singletonList(new AAICustomer("1", "name", "type"));
+ List<AAICustomer> customers = singletonList(new AAICustomer("1", "name", "type","version"));
AAIService aaiService = mock(AAIService.class);
AAICustomerRsp rsp = new AAICustomerRsp();
@@ -154,7 +154,7 @@ public class DefaultCustomerServiceTest {
AAIService aaiService = mock(AAIService.class);
CustomerService customerService = new DefaultCustomerService(aaiService);
String customerId="1";
- AAICustomer customer = new AAICustomer(customerId, customerId, customerId);
+ AAICustomer customer = new AAICustomer(customerId, customerId, customerId,customerId);
when(aaiService.getCustomerById(eq(customerId))).thenReturn(successfulCall(customer));
customerService.getCustomerById(customerId);
}