commit f0f8f7c630b84f1893308cde38773227da0ce88c Author: David Hermann Date: Tue Dec 27 18:05:57 2022 +0100 Initial Commit Created Project Added JUnit5 to pom.xml Added build-project.sh Generated Example Unit Test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..60d10d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* +.DS_Store +/.idea/ +/.out/ +/.target/ \ No newline at end of file diff --git a/build-project.sh b/build-project.sh new file mode 100644 index 0000000..3891e04 --- /dev/null +++ b/build-project.sh @@ -0,0 +1,3 @@ +mvn test + +java src/main/java/org/example/Main.java \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..227f1c5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.example + BitBiome + 1.0-SNAPSHOT + + + 17 + 17 + UTF-8 + + + + + + + org.junit.jupiter + junit-jupiter-engine + 5.9.0 + test + + + + + + BitBiome + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.0 + + + + + + \ No newline at end of file diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java new file mode 100644 index 0000000..0050cd6 --- /dev/null +++ b/src/main/java/org/example/Main.java @@ -0,0 +1,13 @@ +package org.example; + +public class Main { + + + public static void main(String[] args) { + System.out.println("Hello World!"); + } + public static int getLucky() { + return 7; + } + +} \ No newline at end of file diff --git a/src/test/java/org/example/TestMain.java b/src/test/java/org/example/TestMain.java new file mode 100644 index 0000000..1417521 --- /dev/null +++ b/src/test/java/org/example/TestMain.java @@ -0,0 +1,13 @@ +package org.example; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class TestMain { + + @Test + public void testLucky() { + assertEquals(7, Main.getLucky()); + } + +}