Code Review
/
sdnc
/
northbound.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
GenericResourceApiProvider unit tests part 6.
[sdnc/northbound.git]
/
generic-resource-api
/
provider
/
src
/
test
/
java
/
org
/
onap
/
sdnc
/
northbound
/
ServiceTopologyOperationRPCTest.java
diff --git
a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
index
ee0bdb5
..
faacd22
100644
(file)
--- a/
generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
+++ b/
generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/ServiceTopologyOperationRPCTest.java
@@
-87,26
+87,30
@@
public class ServiceTopologyOperationRPCTest extends GenericResourceApiProviderT
svcClient.mockExecute(svcResultProp);
// create the ServiceTopologyOperationInput from the template
svcClient.mockExecute(svcResultProp);
// create the ServiceTopologyOperationInput from the template
- ServiceTopologyOperationInput
serviceTopologyOperationI
nput = createSTOI();
+ ServiceTopologyOperationInput
i
nput = createSTOI();
//execute the mdsal exec
//execute the mdsal exec
- ServiceTopologyOperationOutput
actualServiceTopologyOperationO
utput = exec(
+ ServiceTopologyOperationOutput
o
utput = exec(
genericResourceApiProvider::serviceTopologyOperation
genericResourceApiProvider::serviceTopologyOperation
- ,
serviceTopologyOperationI
nput
+ ,
i
nput
, RpcResult::getResult
);
, RpcResult::getResult
);
+ assertEquals("200", output.getResponseCode());
+ assertEquals("OK", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+
//verify the returned ServiceTopologyOperationOutput
ServiceTopologyOperationOutput expectedServiceTopologyOperationOutput = createExpectedSTOO(svcResultProp,
//verify the returned ServiceTopologyOperationOutput
ServiceTopologyOperationOutput expectedServiceTopologyOperationOutput = createExpectedSTOO(svcResultProp,
-
serviceTopologyOperationI
nput);
- assertEquals(expectedServiceTopologyOperationOutput,
actualServiceTopologyOperationO
utput);
+
i
nput);
+ assertEquals(expectedServiceTopologyOperationOutput,
o
utput);
//verify the persisted Service
//verify the persisted Service
- Service actualService = db.read(
serviceTopologyOperationI
nput.getServiceInformation().getServiceInstanceId(),
+ Service actualService = db.read(
i
nput.getServiceInformation().getServiceInstanceId(),
LogicalDatastoreType.CONFIGURATION);
Service expectedService = createExpectedService(
expectedServiceTopologyOperationOutput,
LogicalDatastoreType.CONFIGURATION);
Service expectedService = createExpectedService(
expectedServiceTopologyOperationOutput,
-
serviceTopologyOperationI
nput,
+
i
nput,
actualService);
assertEquals(expectedService, actualService);
actualService);
assertEquals(expectedService, actualService);