summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager
diff options
context:
space:
mode:
authorm.kowalski3 <m.kowalski3@partner.samsung.com>2019-06-25 12:07:36 +0200
committerOren Kleks <orenkle@amdocs.com>2019-06-25 12:14:00 +0000
commitb0f83a8400973be1be2b8fadafd1b3da740f12ad (patch)
treef0967518412025f9ef528e824b107fd0cf7ea663 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager
parent7433e04b1e6c5b1fbdf840c969cbaba00579023b (diff)
Add unit test for CompositionEntityDataManagerImpl
Issue-ID: SDC-2327 Signed-off-by: Marcin Kowalski <m.kowalski3@partner.samsung.com> Change-Id: I77efe6d3da88de11ea41484d5ce17d736d6d142b
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImplTest.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImplTest.java
index 836767ddda..a7da29d5c4 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImplTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -33,7 +35,6 @@ import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.impl.CompositionEntityDataManagerImpl;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityId;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityType;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionEntityValidationData;
@@ -281,4 +282,14 @@ public class CompositionEntityDataManagerImplTest {
private static String loadFileToString(String path) {
return new String(FileUtils.toByteArray(FileUtils.loadFileToInputStream(path)));
}
-} \ No newline at end of file
+
+ @Test(expected = CoreException.class)
+ public void shouldReturnCoreException() {
+ //given
+ NetworkCompositionSchemaInput schemaTemplateInput = new NetworkCompositionSchemaInput();
+
+ //then
+ compositionEntityDataManager.validateEntity(null, SchemaTemplateContext.composition, schemaTemplateInput);
+ }
+
+}