From b0f83a8400973be1be2b8fadafd1b3da740f12ad Mon Sep 17 00:00:00 2001 From: "m.kowalski3" Date: Tue, 25 Jun 2019 12:07:36 +0200 Subject: Add unit test for CompositionEntityDataManagerImpl Issue-ID: SDC-2327 Signed-off-by: Marcin Kowalski Change-Id: I77efe6d3da88de11ea41484d5ce17d736d6d142b --- .../impl/CompositionEntityDataManagerImplTest.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp') 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); + } + +} -- cgit 1.2.3-korg