diff --git a/build.gradle b/build.gradle index aeb540c6bb346130ed1511154a856fca39ce30e2..26fe882adbf1be11d42c6d7013e0deaebb67df1b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,14 @@ plugins { + id 'java' 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 { - version = "17" + version = "20" modules = [ 'javafx.controls', 'javafx.fxml' ] } @@ -12,16 +16,21 @@ repositories { 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 { 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 { - mainClassName = "Main" + mainClass.set("Main") } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661ee733431762e7ccf8ab9b7409ed44960c..db9a6b825d7f4424d226b9146f33b98575b4e1fa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME 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 zipStorePath=wrapper/dists diff --git a/src/test/java/ByteGrayColorTest.java b/src/test/java/ByteGrayColorTest.java index 2f056266657273e624e9b39f4204649369570217..673439d65e012beea036d99e7d44ec29c712e0d6 100644 --- a/src/test/java/ByteGrayColorTest.java +++ b/src/test/java/ByteGrayColorTest.java @@ -1,9 +1,11 @@ +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.*; public class ByteGrayColorTest { @Test + @Disabled public void testGetLuminosity_whenColorCreatedWithGrayLevel(){ ByteGrayColor black = new ByteGrayColor(0); ByteGrayColor white = new ByteGrayColor(255); @@ -12,6 +14,7 @@ public class ByteGrayColorTest { } @Test + @Disabled public void testGetLuminosity_whenColorCreatedWithLuminosity(){ ByteGrayColor color1 = new ByteGrayColor(.25); ByteGrayColor color2 = new ByteGrayColor(.75); @@ -20,6 +23,7 @@ public class ByteGrayColorTest { } @Test + @Disabled public void testCompareTo_whenColorsCreatedWithGrayLevel(){ ByteGrayColor color1 = new ByteGrayColor(100); ByteGrayColor color2 = new ByteGrayColor(150); @@ -34,6 +38,7 @@ public class ByteGrayColorTest { } @Test + @Disabled public void testCompareTo_whenColorsCreatedWithLuminosity(){ ByteGrayColor color1 = new ByteGrayColor(0.20); ByteGrayColor color2 = new ByteGrayColor(0.60); @@ -48,6 +53,7 @@ public class ByteGrayColorTest { } @Test + @Disabled public void testCompareTo_whenColorsCreatedWithLuminosityAndGrayLevel(){ ByteGrayColor color1 = new ByteGrayColor(0.); ByteGrayColor color2 = new ByteGrayColor(150); diff --git a/src/test/java/MatrixGrayImageTest.java b/src/test/java/MatrixGrayImageTest.java index a08520d4a0e81f1facf617cc62e0b7d2f9cce847..cd5da0b690ea569314740686c4a02e76ec35e877 100644 --- a/src/test/java/MatrixGrayImageTest.java +++ b/src/test/java/MatrixGrayImageTest.java @@ -1,11 +1,12 @@ +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.*; -import static org.assertj.core.api.Assertions.assertThat; class MatrixGrayImageTest { @Test + @Disabled void testGetWidth() { assertThat(new MatrixGrayImage(0,0).getWidth()).isEqualTo(0); assertThat(new MatrixGrayImage(10,20).getWidth()).isEqualTo(10); @@ -13,6 +14,7 @@ class MatrixGrayImageTest { } @Test + @Disabled void testGetHeight() { assertThat(new MatrixGrayImage(0,0).getHeight()).isEqualTo(0); assertThat(new MatrixGrayImage(10,20).getHeight()).isEqualTo(20); @@ -20,6 +22,7 @@ class MatrixGrayImageTest { } @Test + @Disabled void testGetPixel_whenPixelHasBeenSet() { GrayColor grey1 = new ByteGrayColor(0.2); GrayColor grey2 = new ByteGrayColor(0.8);