Browse Source
Merge commit '1f2f757009e72d8980f80f5bb024959107aba902' into HEAD
feature_TicTacToe_BaseUI
Merge commit '1f2f757009e72d8980f80f5bb024959107aba902' into HEAD
feature_TicTacToe_BaseUI
Jenkins
3 years ago
10 changed files with 264 additions and 0 deletions
-
27.classpath
-
23.project
-
4.settings/org.eclipse.core.resources.prefs
-
8.settings/org.eclipse.jdt.core.prefs
-
4.settings/org.eclipse.m2e.core.prefs
-
98pom.xml
-
13src/main/java/Arcade64/Arcade64/App.java
-
25src/main/java/Arcade64/Arcade64/Code.java
-
20src/test/java/Arcade64/Arcade64/AppTest.java
-
42src/test/java/Arcade64/Arcade64/Test_Code.java
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<classpath> |
||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java"> |
||||
|
<attributes> |
||||
|
<attribute name="optional" value="true"/> |
||||
|
<attribute name="maven.pomderived" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> |
||||
|
<attributes> |
||||
|
<attribute name="optional" value="true"/> |
||||
|
<attribute name="maven.pomderived" value="true"/> |
||||
|
<attribute name="test" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> |
||||
|
<attributes> |
||||
|
<attribute name="maven.pomderived" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
||||
|
<attributes> |
||||
|
<attribute name="maven.pomderived" value="true"/> |
||||
|
</attributes> |
||||
|
</classpathentry> |
||||
|
<classpathentry kind="output" path="target/classes"/> |
||||
|
</classpath> |
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<projectDescription> |
||||
|
<name>Arcade64</name> |
||||
|
<comment></comment> |
||||
|
<projects> |
||||
|
</projects> |
||||
|
<buildSpec> |
||||
|
<buildCommand> |
||||
|
<name>org.eclipse.jdt.core.javabuilder</name> |
||||
|
<arguments> |
||||
|
</arguments> |
||||
|
</buildCommand> |
||||
|
<buildCommand> |
||||
|
<name>org.eclipse.m2e.core.maven2Builder</name> |
||||
|
<arguments> |
||||
|
</arguments> |
||||
|
</buildCommand> |
||||
|
</buildSpec> |
||||
|
<natures> |
||||
|
<nature>org.eclipse.jdt.core.javanature</nature> |
||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature> |
||||
|
</natures> |
||||
|
</projectDescription> |
@ -0,0 +1,4 @@ |
|||||
|
eclipse.preferences.version=1 |
||||
|
encoding//src/main/java=UTF-8 |
||||
|
encoding//src/test/java=UTF-8 |
||||
|
encoding/<project>=UTF-8 |
@ -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 |
@ -0,0 +1,4 @@ |
|||||
|
activeProfiles= |
||||
|
eclipse.preferences.version=1 |
||||
|
resolveWorkspaceProjects=true |
||||
|
version=1 |
@ -0,0 +1,98 @@ |
|||||
|
<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>Arcade64</groupId> |
||||
|
<artifactId>Arcade64</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
<packaging>jar</packaging> |
||||
|
|
||||
|
|
||||
|
<properties> |
||||
|
<maven.compiler.target>11</maven.compiler.target> |
||||
|
<maven.compiler.source>11</maven.compiler.source> |
||||
|
<junit.jupiter.version>5.8.1</junit.jupiter.version> |
||||
|
<junit.platform.version>1.8.1</junit.platform.version> |
||||
|
<mockito.version>4.1.0</mockito.version> |
||||
|
<assertj.version>3.21.0</assertj.version> |
||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
|
</properties> |
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.jupiter</groupId> |
||||
|
<artifactId>junit-jupiter-engine</artifactId> |
||||
|
<version>${junit.jupiter.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.jupiter</groupId> |
||||
|
<artifactId>junit-jupiter-api</artifactId> |
||||
|
<version>${junit.jupiter.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.jupiter</groupId> |
||||
|
<artifactId>junit-jupiter-params</artifactId> |
||||
|
<version>${junit.jupiter.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.platform</groupId> |
||||
|
<artifactId>junit-platform-suite</artifactId> |
||||
|
<version>${junit.platform.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mockito</groupId> |
||||
|
<artifactId>mockito-core</artifactId> |
||||
|
<version>${mockito.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.mockito</groupId> |
||||
|
<artifactId>mockito-junit-jupiter</artifactId> |
||||
|
<version>${mockito.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.assertj</groupId> |
||||
|
<artifactId>assertj-core</artifactId> |
||||
|
<version>${assertj.version}</version> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.apache.maven.plugins</groupId> |
||||
|
<artifactId>maven-surefire-plugin</artifactId> |
||||
|
<version>2.19.1</version> <!-- Specific due to memory leak in 2.20 --> |
||||
|
<dependencies> |
||||
|
<!--Custom provider and engine for Junit 5 to surefire --> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.platform</groupId> |
||||
|
<artifactId>junit-platform-surefire-provider</artifactId> |
||||
|
<version>1.0.1</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.junit.jupiter</groupId> |
||||
|
<artifactId>junit-jupiter-engine</artifactId> |
||||
|
<version>${junit.jupiter.version}</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
<!-- <configuration> |
||||
|
<argLine>${argLine}</argLine> |
||||
|
</configuration> --> |
||||
|
</plugin> |
||||
|
<plugin> |
||||
|
<groupId>org.apache.maven.plugins</groupId> |
||||
|
<artifactId>maven-compiler-plugin</artifactId> |
||||
|
<version>3.8.1</version> |
||||
|
<configuration> |
||||
|
<source>1.8</source> |
||||
|
<target>1.8</target> |
||||
|
</configuration> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,13 @@ |
|||||
|
package Arcade64.Arcade64; |
||||
|
|
||||
|
/** |
||||
|
* Hello world! |
||||
|
* |
||||
|
*/ |
||||
|
public class App |
||||
|
{ |
||||
|
public static void main( String[] args ) |
||||
|
{ |
||||
|
System.out.println( "Hello World!" ); |
||||
|
} |
||||
|
} |
@ -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; |
||||
|
} |
||||
|
|
||||
|
} |
@ -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 ); |
||||
|
// } |
||||
|
} |
@ -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<Arguments> 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) |
||||
|
); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue