aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org
diff options
context:
space:
mode:
authorMnushkin, Dmitry <dmitry.mnushkin@att.com>2019-07-26 13:17:12 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-07-26 13:17:20 -0400
commit3b5f5ddb3cbc57227a2e416b38b4e20535ac9b4b (patch)
treec58a47f310a60dc3994efdb540b118b22301f25c /bpmn/MSOCommonBPMN/src/test/java/org
parentf5a69be34850dc102c02514a8126e79f00226fa6 (diff)
validate model info for existing service with
verify modelVersionId equals during SI AAI validation correct SI name in junit test update SI name in junit test comparison add name/module id verifications for other objects add back junit file after merge from remote format jnit file after verify job failure updated test input values for clarity update name verifications with related ID values adding junit for Configuration name verification updated aai verify call, service dup error msg removed aai depth 2 and refactored private test method implement SI name verification with 3 additional fields fix formatting comment line length limitation Issue-ID: SO-2161 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I43f5cb0601dfa8b41f474615b639fce0572f5613
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
index 189947595a..7780837714 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
@@ -47,6 +47,7 @@ import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.onap.aai.domain.yang.CloudRegion;
import org.onap.aai.domain.yang.Configuration;
+import org.onap.aai.domain.yang.Configurations;
import org.onap.aai.domain.yang.GenericVnf;
import org.onap.aai.domain.yang.GenericVnfs;
import org.onap.aai.domain.yang.L3Network;
@@ -865,4 +866,16 @@ public class BBInputSetupUtilsTest {
assertEquals(expectedFlowsToExecute.size(), flowsToExecute.size());
}
+ @Test
+ public void getRelatedConfigurationByNameFromServiceInstanceTest() throws Exception {
+ Optional<Configurations> expected = Optional.of(new Configurations());
+ Configuration configuration = new Configuration();
+ configuration.setConfigurationId("id123");
+ expected.get().getConfiguration().add(configuration);
+ doReturn(expected).when(MOCK_aaiResourcesClient).get(eq(Configurations.class), any(AAIResourceUri.class));
+ Optional<Configuration> actual =
+ this.bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance("id123", "name123");
+ assertEquals(actual.get().getConfigurationId(), expected.get().getConfiguration().get(0).getConfigurationId());
+ }
+
}