From 7a78ed75c027af61e91c5bad8cc5e654d36b5d48 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Wed, 21 Dec 2022 10:46:42 +0100
Subject: [PATCH] OZG-3284 fix test coverage

---
 formcycle-adapter/formcycle-adapter-impl/pom.xml  | 15 +++++++++++++++
 .../formcycle/FormDataControllerITCase.java       |  5 +++++
 .../FormcycleAdapterApplicationTest.java          | 15 +++++++++++++++
 .../src/test/resources/application-itcase.yml     |  4 ++++
 4 files changed, 39 insertions(+)
 create mode 100644 formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormcycleAdapterApplicationTest.java
 create mode 100644 formcycle-adapter/formcycle-adapter-impl/src/test/resources/application-itcase.yml

diff --git a/formcycle-adapter/formcycle-adapter-impl/pom.xml b/formcycle-adapter/formcycle-adapter-impl/pom.xml
index 156e71052..13b0e9c9a 100644
--- a/formcycle-adapter/formcycle-adapter-impl/pom.xml
+++ b/formcycle-adapter/formcycle-adapter-impl/pom.xml
@@ -80,6 +80,21 @@
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
+			
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-failsafe-plugin</artifactId>
+			</plugin>
+			
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+			</plugin>
 		</plugins>
 	</build>
 
diff --git a/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormDataControllerITCase.java b/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormDataControllerITCase.java
index 1ceebd58e..d37659432 100644
--- a/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormDataControllerITCase.java
+++ b/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormDataControllerITCase.java
@@ -7,10 +7,12 @@ import org.junit.jupiter.api.Nested;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.mock.mockito.MockBean;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.ResultActions;
 
 import de.itvsh.kop.common.test.ITCase;
+import de.itvsh.kop.eingangsadapter.semantik.SemantikAdapter;
 import lombok.SneakyThrows;
 
 @ITCase
@@ -20,6 +22,9 @@ class FormDataControllerITCase {
 	@Autowired
 	private MockMvc mockMvc;
 
+	@MockBean
+	private SemantikAdapter semantikAdapter;
+
 	@Nested
 	class ReceiveFormData {
 
diff --git a/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormcycleAdapterApplicationTest.java b/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormcycleAdapterApplicationTest.java
new file mode 100644
index 000000000..eb0a230cd
--- /dev/null
+++ b/formcycle-adapter/formcycle-adapter-impl/src/test/java/de/itvsh/kop/eingang/formcycle/FormcycleAdapterApplicationTest.java
@@ -0,0 +1,15 @@
+package de.itvsh.kop.eingang.formcycle;
+
+import org.junit.jupiter.api.Test;
+
+import de.itvsh.kop.common.test.ITCase;
+
+@ITCase
+class FormcycleAdapterApplicationTest {
+
+	@Test
+	void shouldStartApplication() {
+		// just start without an error
+	}
+
+}
diff --git a/formcycle-adapter/formcycle-adapter-impl/src/test/resources/application-itcase.yml b/formcycle-adapter/formcycle-adapter-impl/src/test/resources/application-itcase.yml
new file mode 100644
index 000000000..5af1d6e43
--- /dev/null
+++ b/formcycle-adapter/formcycle-adapter-impl/src/test/resources/application-itcase.yml
@@ -0,0 +1,4 @@
+kop:
+  adapter:
+    targetPlutoName: local
+    fallbackStrategy: DENY
\ No newline at end of file
-- 
GitLab