From 1f2f757009e72d8980f80f5bb024959107aba902 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Tue, 18 Jan 2022 17:07:30 +0100 Subject: [PATCH] First_Test --- .classpath | 27 +++++ .project | 23 +++++ .settings/org.eclipse.core.resources.prefs | 4 + .settings/org.eclipse.jdt.core.prefs | 8 ++ .settings/org.eclipse.m2e.core.prefs | 4 + pom.xml | 98 +++++++++++++++++++ src/main/java/Arcade64/Arcade64/App.java | 13 +++ src/main/java/Arcade64/Arcade64/Code.java | 25 +++++ src/test/java/Arcade64/Arcade64/AppTest.java | 20 ++++ .../java/Arcade64/Arcade64/Test_Code.java | 42 ++++++++ 10 files changed, 264 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.eclipse.m2e.core.prefs create mode 100644 pom.xml create mode 100644 src/main/java/Arcade64/Arcade64/App.java create mode 100644 src/main/java/Arcade64/Arcade64/Code.java create mode 100644 src/test/java/Arcade64/Arcade64/AppTest.java create mode 100644 src/test/java/Arcade64/Arcade64/Test_Code.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..5e8a55f --- /dev/null +++ b/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..dead7e4 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + Arcade64 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f9fe345 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..2f5cc74 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4c42f7b --- /dev/null +++ b/pom.xml @@ -0,0 +1,98 @@ + + 4.0.0 + Arcade64 + Arcade64 + 1.0-SNAPSHOT + jar + + + + 11 + 11 + 5.8.1 + 1.8.1 + 4.1.0 + 3.21.0 + UTF-8 + UTF-8 + + + + org.junit.jupiter + junit-jupiter-engine + ${junit.jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-api + ${junit.jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit.jupiter.version} + test + + + org.junit.platform + junit-platform-suite + ${junit.platform.version} + test + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.mockito + mockito-junit-jupiter + ${mockito.version} + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + + org.junit.platform + junit-platform-surefire-provider + 1.0.1 + + + org.junit.jupiter + junit-jupiter-engine + ${junit.jupiter.version} + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + + \ No newline at end of file diff --git a/src/main/java/Arcade64/Arcade64/App.java b/src/main/java/Arcade64/Arcade64/App.java new file mode 100644 index 0000000..baf93cd --- /dev/null +++ b/src/main/java/Arcade64/Arcade64/App.java @@ -0,0 +1,13 @@ +package Arcade64.Arcade64; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/src/main/java/Arcade64/Arcade64/Code.java b/src/main/java/Arcade64/Arcade64/Code.java new file mode 100644 index 0000000..b2f7d10 --- /dev/null +++ b/src/main/java/Arcade64/Arcade64/Code.java @@ -0,0 +1,25 @@ +package Arcade64.Arcade64; + +public class Code { + //################################# + + + /* ################################# + * ################################# + * ################################# + * ################################# + * ################################# + * sdaf + * safd + * asf + * as + * fs + * fs + * dsfdsfdsfsdfsdfsdfs + * */ + public int rechne(int a, int b) { + //################################# + return a+b; + } + +} diff --git a/src/test/java/Arcade64/Arcade64/AppTest.java b/src/test/java/Arcade64/Arcade64/AppTest.java new file mode 100644 index 0000000..97c1899 --- /dev/null +++ b/src/test/java/Arcade64/Arcade64/AppTest.java @@ -0,0 +1,20 @@ +package Arcade64.Arcade64; + +//import static org.junit.Assert.assertTrue; + +//import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ +// /** +// * Rigorous Test :-) +// */ +// @Test +// public void shouldAnswerWithTrue() +// { +// assertTrue( true ); +// } +} diff --git a/src/test/java/Arcade64/Arcade64/Test_Code.java b/src/test/java/Arcade64/Arcade64/Test_Code.java new file mode 100644 index 0000000..fe207fb --- /dev/null +++ b/src/test/java/Arcade64/Arcade64/Test_Code.java @@ -0,0 +1,42 @@ +package Arcade64.Arcade64; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.stream.Stream; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +class Test_Code { + + @BeforeAll + static void setUpBeforeClass() throws Exception {} + + + @ParameterizedTest + @MethodSource("testCaserechnen") + void test(String msg, int _a, int _b, int _aspectresult ) { + Code a = new Code(); + + int resulst = a.rechne(_a, _b); + + assertEquals(resulst, _aspectresult, msg); + } + + + + private static Stream testCaserechnen(){ + return Stream.of( + Arguments.of("88", 80,8,88), + Arguments.of("45", 22,23, 45), + Arguments.of("96", 8,8,16), + Arguments.of("96", 8,16,24) + ); + + + } + +}