aboutsummaryrefslogtreecommitdiffstats
path: root/sdnc_report_api_sdnc_253_story
diff options
context:
space:
mode:
Diffstat (limited to 'sdnc_report_api_sdnc_253_story')
-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/