`ApplicationIT` zurück in `ApplicationTests` umbenannt -- MOVE
authorKai Moritz <kai@juplo.de>
Thu, 14 Nov 2024 19:46:10 +0000 (20:46 +0100)
committerKai Moritz <kai@juplo.de>
Thu, 14 Nov 2024 19:47:03 +0000 (20:47 +0100)
src/test/java/de/juplo/kafka/ApplicationIT.java [deleted file]
src/test/java/de/juplo/kafka/ApplicationTests.java [new file with mode: 0644]

diff --git a/src/test/java/de/juplo/kafka/ApplicationIT.java b/src/test/java/de/juplo/kafka/ApplicationIT.java
deleted file mode 100644 (file)
index 1baca99..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package de.juplo.kafka;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.test.web.server.LocalServerPort;
-import org.springframework.kafka.test.context.EmbeddedKafka;
-
-import static de.juplo.kafka.ApplicationIT.TOPIC;
-
-
-@SpringBootTest(
-    webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
-    properties = {
-        "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
-        "simple.consumer.topic=" + TOPIC })
-@EmbeddedKafka(topics = TOPIC)
-public class ApplicationIT
-{
-  public static final String TOPIC = "FOO";
-
-  @LocalServerPort
-  private int port;
-
-  @Autowired
-  private TestRestTemplate restTemplate;
-
-
-
-  @Test
-  public void testApplicationStartup()
-  {
-    restTemplate.getForObject(
-        "http://localhost:" + port + "/actuator/health",
-        String.class
-        )
-        .contains("UP");
-  }
-}
diff --git a/src/test/java/de/juplo/kafka/ApplicationTests.java b/src/test/java/de/juplo/kafka/ApplicationTests.java
new file mode 100644 (file)
index 0000000..1baca99
--- /dev/null
@@ -0,0 +1,40 @@
+package de.juplo.kafka;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.boot.test.web.server.LocalServerPort;
+import org.springframework.kafka.test.context.EmbeddedKafka;
+
+import static de.juplo.kafka.ApplicationIT.TOPIC;
+
+
+@SpringBootTest(
+    webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
+    properties = {
+        "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
+        "simple.consumer.topic=" + TOPIC })
+@EmbeddedKafka(topics = TOPIC)
+public class ApplicationIT
+{
+  public static final String TOPIC = "FOO";
+
+  @LocalServerPort
+  private int port;
+
+  @Autowired
+  private TestRestTemplate restTemplate;
+
+
+
+  @Test
+  public void testApplicationStartup()
+  {
+    restTemplate.getForObject(
+        "http://localhost:" + port + "/actuator/health",
+        String.class
+        )
+        .contains("UP");
+  }
+}