Skip to content
Snippets Groups Projects
Commit ef31ea10 authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

mise à jour config junit

parent 37446083
No related branches found
No related tags found
No related merge requests found
plugins { plugins {
id 'java'
id 'application' id 'application'
id "org.openjfx.javafxplugin" version "0.0.13" id "org.openjfx.javafxplugin" version "0.0.14"
} }
group 'M2_BIO_INFO'
version '1.0-SNAPSHOT'
javafx { javafx {
version = "17" version = "20"
modules = [ 'javafx.controls', 'javafx.fxml' ] modules = [ 'javafx.controls', 'javafx.fxml' ]
} }
...@@ -12,16 +16,21 @@ repositories { ...@@ -12,16 +16,21 @@ repositories {
mavenCentral() mavenCentral()
} }
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter-api:5.9.0',
'org.assertj:assertj-core:3.23.1')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.9.0')
}
test { test {
useJUnitPlatform() useJUnitPlatform()
} }
dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
}
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
}
application { application {
mainClassName = "Main" mainClass.set("Main")
} }
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*; import static org.assertj.core.api.Assertions.*;
public class ByteGrayColorTest { public class ByteGrayColorTest {
@Test @Test
@Disabled
public void testGetLuminosity_whenColorCreatedWithGrayLevel(){ public void testGetLuminosity_whenColorCreatedWithGrayLevel(){
ByteGrayColor black = new ByteGrayColor(0); ByteGrayColor black = new ByteGrayColor(0);
ByteGrayColor white = new ByteGrayColor(255); ByteGrayColor white = new ByteGrayColor(255);
...@@ -12,6 +14,7 @@ public class ByteGrayColorTest { ...@@ -12,6 +14,7 @@ public class ByteGrayColorTest {
} }
@Test @Test
@Disabled
public void testGetLuminosity_whenColorCreatedWithLuminosity(){ public void testGetLuminosity_whenColorCreatedWithLuminosity(){
ByteGrayColor color1 = new ByteGrayColor(.25); ByteGrayColor color1 = new ByteGrayColor(.25);
ByteGrayColor color2 = new ByteGrayColor(.75); ByteGrayColor color2 = new ByteGrayColor(.75);
...@@ -20,6 +23,7 @@ public class ByteGrayColorTest { ...@@ -20,6 +23,7 @@ public class ByteGrayColorTest {
} }
@Test @Test
@Disabled
public void testCompareTo_whenColorsCreatedWithGrayLevel(){ public void testCompareTo_whenColorsCreatedWithGrayLevel(){
ByteGrayColor color1 = new ByteGrayColor(100); ByteGrayColor color1 = new ByteGrayColor(100);
ByteGrayColor color2 = new ByteGrayColor(150); ByteGrayColor color2 = new ByteGrayColor(150);
...@@ -34,6 +38,7 @@ public class ByteGrayColorTest { ...@@ -34,6 +38,7 @@ public class ByteGrayColorTest {
} }
@Test @Test
@Disabled
public void testCompareTo_whenColorsCreatedWithLuminosity(){ public void testCompareTo_whenColorsCreatedWithLuminosity(){
ByteGrayColor color1 = new ByteGrayColor(0.20); ByteGrayColor color1 = new ByteGrayColor(0.20);
ByteGrayColor color2 = new ByteGrayColor(0.60); ByteGrayColor color2 = new ByteGrayColor(0.60);
...@@ -48,6 +53,7 @@ public class ByteGrayColorTest { ...@@ -48,6 +53,7 @@ public class ByteGrayColorTest {
} }
@Test @Test
@Disabled
public void testCompareTo_whenColorsCreatedWithLuminosityAndGrayLevel(){ public void testCompareTo_whenColorsCreatedWithLuminosityAndGrayLevel(){
ByteGrayColor color1 = new ByteGrayColor(0.); ByteGrayColor color1 = new ByteGrayColor(0.);
ByteGrayColor color2 = new ByteGrayColor(150); ByteGrayColor color2 = new ByteGrayColor(150);
......
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*; import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.Assertions.assertThat;
class MatrixGrayImageTest { class MatrixGrayImageTest {
@Test @Test
@Disabled
void testGetWidth() { void testGetWidth() {
assertThat(new MatrixGrayImage(0,0).getWidth()).isEqualTo(0); assertThat(new MatrixGrayImage(0,0).getWidth()).isEqualTo(0);
assertThat(new MatrixGrayImage(10,20).getWidth()).isEqualTo(10); assertThat(new MatrixGrayImage(10,20).getWidth()).isEqualTo(10);
...@@ -13,6 +14,7 @@ class MatrixGrayImageTest { ...@@ -13,6 +14,7 @@ class MatrixGrayImageTest {
} }
@Test @Test
@Disabled
void testGetHeight() { void testGetHeight() {
assertThat(new MatrixGrayImage(0,0).getHeight()).isEqualTo(0); assertThat(new MatrixGrayImage(0,0).getHeight()).isEqualTo(0);
assertThat(new MatrixGrayImage(10,20).getHeight()).isEqualTo(20); assertThat(new MatrixGrayImage(10,20).getHeight()).isEqualTo(20);
...@@ -20,6 +22,7 @@ class MatrixGrayImageTest { ...@@ -20,6 +22,7 @@ class MatrixGrayImageTest {
} }
@Test @Test
@Disabled
void testGetPixel_whenPixelHasBeenSet() { void testGetPixel_whenPixelHasBeenSet() {
GrayColor grey1 = new ByteGrayColor(0.2); GrayColor grey1 = new ByteGrayColor(0.2);
GrayColor grey2 = new ByteGrayColor(0.8); GrayColor grey2 = new ByteGrayColor(0.8);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment