aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Varvate <VV00489503@TechMahindra.com>2018-03-20 15:35:48 +0530
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-03-22 16:21:56 -0400
commit392955307bdf767eac30447c49617efb8d6dc19a (patch)
tree3ee9e7ee26dd44049c1fcdefe43bf0019ad9a1cc
parent361ac67fa74f1136d413b364fae6602076b614df (diff)
SDNC-253 Historical Report Code Coverage Commit
sdnc_reports_api Provides GUI for viewing historical reports, . Issue-ID: SDNC-253 Change-Id: Ifa2337a2acc368856b64c08502c85ec86bbae8d8 Signed-off-by: vvarvate <vv00489503@techmahindra.com> Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
-rw-r--r--sdnc_report_api_sdnc_253_story/sdnc_reports_api/.gitignore1
-rw-r--r--sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/ApplicationTest.java33
-rw-r--r--sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/controller/WebControllerTest.java34
-rw-r--r--sdnc_report_api_sdnc_253_story/sdnc_reports_dao/.gitignore1
4 files changed, 69 insertions, 0 deletions
diff --git a/sdnc_report_api_sdnc_253_story/sdnc_reports_api/.gitignore b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/ApplicationTest.java b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/ApplicationTest.java
new file mode 100644
index 0000000..44e7370
--- /dev/null
+++ b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/ApplicationTest.java
@@ -0,0 +1,33 @@
+package com.onap.sdnc.reports;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.onap.sdnc.reports.controller.ReportController;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = Application.class)
+public class ApplicationTest {
+
+ private static final Logger logger = LogManager.getLogger(ApplicationTest.class);
+
+ @Autowired
+ private ReportController reportController;
+
+ @Test
+ public void contextLoads() throws Exception
+ {
+ logger.info("Context Load Test Succeded");
+ System.out.println("Context Loaded");
+ }
+
+}
diff --git a/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/controller/WebControllerTest.java b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/controller/WebControllerTest.java
new file mode 100644
index 0000000..791194b
--- /dev/null
+++ b/sdnc_report_api_sdnc_253_story/sdnc_reports_api/src/test/java/com/onap/sdnc/reports/controller/WebControllerTest.java
@@ -0,0 +1,34 @@
+package com.onap.sdnc.reports.controller;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.web.servlet.MockMvc;
+
+import com.onap.sdnc.reports.Application;
+
+@RunWith(SpringRunner.class)
+@ContextConfiguration(classes=Application.class)
+@WebMvcTest(WebController.class)
+public class WebControllerTest {
+
+ @Autowired
+ private MockMvc mockMvc;
+
+ @Test
+ public void shouldReturnDefaultView() throws Exception {
+ this.mockMvc.perform(get("/")).andDo(print())
+ .andExpect(status().isOk())
+ .andExpect(view().name("index"));
+ }
+
+}
diff --git a/sdnc_report_api_sdnc_253_story/sdnc_reports_dao/.gitignore b/sdnc_report_api_sdnc_253_story/sdnc_reports_dao/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/sdnc_report_api_sdnc_253_story/sdnc_reports_dao/.gitignore
@@ -0,0 +1 @@
+/target/