From 581f98c0980ff36af24c186ff8e32ffdfaa25792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg-Christian=20M=C3=BCller?= Date: Wed, 18 Jan 2023 11:03:30 +0100 Subject: [PATCH] End Lesson 71: JUnit 5 --- pom.xml | 25 +++++++++++++++++++ .../springframework/JavaHelloWorldTest.java | 14 +++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/test/java/guru/springframework/JavaHelloWorldTest.java diff --git a/pom.xml b/pom.xml index 1822645..b2c542e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,5 +14,30 @@ 11 ${java.version} ${java.version} + 5.9.2 + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + + \ No newline at end of file diff --git a/src/test/java/guru/springframework/JavaHelloWorldTest.java b/src/test/java/guru/springframework/JavaHelloWorldTest.java new file mode 100644 index 0000000..ebcb491 --- /dev/null +++ b/src/test/java/guru/springframework/JavaHelloWorldTest.java @@ -0,0 +1,14 @@ +package guru.springframework; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class JavaHelloWorldTest { + + @Test + void getHello() { + JavaHelloWorld javaHelloWorld = new JavaHelloWorld(); + assertEquals("Hello World", javaHelloWorld.getHello()); + } +} \ No newline at end of file