Browse Source

Initial Commit

Created Project
Added JUnit5 to pom.xml
Added build-project.sh
Generated Example Unit Test
remotes/origin/locations
David Hermann 2 years ago
commit
f0f8f7c630
  1. 28
      .gitignore
  2. 3
      build-project.sh
  3. 42
      pom.xml
  4. 13
      src/main/java/org/example/Main.java
  5. 13
      src/test/java/org/example/TestMain.java

28
.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/

3
build-project.sh

@ -0,0 +1,3 @@
mvn test
java src/main/java/org/example/Main.java

42
pom.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>BitBiome</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- junit 5, unit test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>BitBiome</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
</plugins>
</build>
</project>

13
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;
}
}

13
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());
}
}
Loading…
Cancel
Save