From 38f9118242fa2991edfdc0481a833684052fecbf Mon Sep 17 00:00:00 2001 From: "m.kowalski3" Date: Tue, 25 Jun 2019 15:38:38 +0200 Subject: Add unit tests for OrchestrationTemplateCandidateManagerImpl Issue-ID: SDC-2327 Signed-off-by: Marcin Kowalski Change-Id: I80b9e404a98e23e135ae12e4d24ee2c7f66fef11 --- ...hestrationTemplateCandidateManagerImplTest.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'openecomp-be') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java index 8f33be131c..9b0e07f144 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/OrchestrationTemplateCandidateManagerImplTest.java @@ -6,6 +6,9 @@ * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 + * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +19,8 @@ package org.openecomp.sdc.vendorsoftwareproduct.impl; +import java.io.IOException; +import org.apache.commons.lang3.tuple.Pair; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -52,6 +57,7 @@ import java.util.Map; import java.util.Optional; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -390,4 +396,20 @@ public class OrchestrationTemplateCandidateManagerImplTest { } } } + + @Test + public void testUpdateFilesDataStructure() { + assertNotNull(candidateManager.updateFilesDataStructure(VSP_ID, VERSION01, new FilesDataStructure())); + } + + @Test + public void testGet() throws IOException { + Optional> optionalStringPair = candidateManager.get(VSP_ID, VERSION01); + assertFalse(optionalStringPair.isPresent()); + } + + @Test + public void testGetInfo() { + assertNotNull(candidateManager.getInfo(VSP_ID, VERSION01)); + } } \ No newline at end of file -- cgit 1.2.3-korg