Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
  • master
2 results

Target

Select target project
  • b23003912/image-template-tp-4-baron-law-yoann
  • s21226517/image-template
  • c19028886/tp-3-rayane-chorfi
  • s23026062/image-sahin
  • t21233923/image-template
  • z23012739/image-template
  • a23026569/image-template-amroun-said
  • boukenze.b/image-template-tp-4
  • l3_s3_infoamu/s3/programmation-2/tp-4-manipulation-dimages
  • c22029830/image-template-rafi
  • m22023183/image-template
  • l3_s3_infoamu/s3/programmation-2/image-template
  • a19029459/image-template
  • a19021078/image-template
  • alaboure/image-template
  • saddem.r/image-template
  • b21229750/image-template-tp-4
17 results
Select Git revision
  • main
  • master
2 results
Show changes
Commits on Source (3)
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")
}
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
......@@ -10,6 +10,8 @@ public class ByteGrayColor implements GrayColor {
private static final int MAXIMUM_GRAY_LEVEL = 255;
private static final int OPACITY = 1;
// TODO : add static ByteGrayColors WHITE and BLACK
private final int grayLevel;
......@@ -51,7 +53,7 @@ public class ByteGrayColor implements GrayColor {
if (this == o) return true;
if (this.getClass() != o.getClass()) return false;
ByteGrayColor color = (ByteGrayColor) o;
return this.compareTo(color) == 0;
return grayLevel == color.grayLevel;
}
}
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);
......
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);
......