From 6dc570c66839fe239b63f1aa8da489c520fb215d Mon Sep 17 00:00:00 2001 From: Yuli Shlosberg Date: Thu, 19 Oct 2017 19:50:28 +0300 Subject: add more unit tests to BE components Change-Id: I23a72857d669f03e8cb7e543c006fed3318670b0 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg --- .../sdc/common/kpi/api/ASDCKpiApiTest.java | 53 ++++++++++++++++++++++ .../common/listener/AppContextListenerTest.java | 43 ++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java create mode 100644 common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java (limited to 'common-app-api/src/test') diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java new file mode 100644 index 0000000000..fa86708eb2 --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/kpi/api/ASDCKpiApiTest.java @@ -0,0 +1,53 @@ +package org.openecomp.sdc.common.kpi.api; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class ASDCKpiApiTest { + + private ASDCKpiApi createTestSubject() { + return new ASDCKpiApi(); + } + + + @Test + public void testCountImportResourcesKPI() throws Exception { + + // default test + ASDCKpiApi.countImportResourcesKPI(); + } + + + @Test + public void testCountCreatedResourcesKPI() throws Exception { + + // default test + ASDCKpiApi.countCreatedResourcesKPI(); + } + + + @Test + public void testCountCreatedServicesKPI() throws Exception { + + // default test + ASDCKpiApi.countCreatedServicesKPI(); + } + + + @Test + public void testCountUsersAuthorizations() throws Exception { + + // default test + ASDCKpiApi.countUsersAuthorizations(); + } + + + @Test + public void testCountActivatedDistribution() throws Exception { + + // default test + ASDCKpiApi.countActivatedDistribution(); + } +} \ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java new file mode 100644 index 0000000000..a9936adae5 --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/listener/AppContextListenerTest.java @@ -0,0 +1,43 @@ +package org.openecomp.sdc.common.listener; + +import java.util.Map; + +import javax.annotation.Generated; +import javax.servlet.ServletContext; +import javax.servlet.ServletContextEvent; + +import org.junit.Test; + + +public class AppContextListenerTest { + + private AppContextListener createTestSubject() { + return new AppContextListener(); + } + + + + + + @Test + public void testContextDestroyed() throws Exception { + AppContextListener testSubject; + ServletContextEvent context = null; + + // default test + testSubject = createTestSubject(); + testSubject.contextDestroyed(context); + } + + + + +// @Test + public void testGetManifestInfo() throws Exception { + ServletContext application = null; + Map result; + + // default test + result = AppContextListener.getManifestInfo(application); + } +} \ No newline at end of file -- cgit 1.2.3-korg