Browse Source

initial figure movement field check (smaller than expected)

feat-figureMovement
Julius Dewender 3 years ago
parent
commit
93d91e7112
  1. 12
      build.gradle
  2. 2
      fh.fd.ci.client/build.gradle
  3. 9
      fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java
  4. 17
      fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java

12
build.gradle

@ -10,10 +10,6 @@ repositories {
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
subprojects {
apply plugin: 'java'
@ -23,11 +19,19 @@ subprojects {
jcenter()
}
test {
useJUnitPlatform()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
testCompileOnly 'org.projectlombok:lombok:1.18.16'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.16'
testImplementation('org.junit.jupiter:junit-jupiter:5.7.0')
testImplementation('org.mockito:mockito-core:3.7.0')
testImplementation('org.hamcrest:hamcrest-core:2.2')
}
}

2
fh.fd.ci.client/build.gradle

@ -1,6 +1,6 @@
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
mainClassName = 'de.fd.fh.ClientApp'

9
fh.fd.ci.client/src/main/java/de/fd/fh/Figure.java

@ -0,0 +1,9 @@
package de.fd.fh;
public class Figure
{
public boolean moveAllowed(int src, int dst, int[] field)
{
return false;
}
}

17
fh.fd.ci.client/src/test/java/de/fd/fh/FigureTest.java

@ -0,0 +1,17 @@
package de.fd.fh;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class FigureTest
{
@Test
void checkMoveWithInvalidFieldSmall() // Feldgröße sollte 8*8 betragen
{
Figure f = new Figure();
assertFalse(f.moveAllowed(0,0, new int[0]));
}
}
Loading…
Cancel
Save