Skip to content
Snippets Groups Projects
Commit 244741f3 authored by Maxence Antoine's avatar Maxence Antoine
Browse files

Ajout de tests Iris et Classification

parent 0d5fcf3b
Branches
Tags
No related merge requests found
package fr.univlille.sae.classification.model;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class ClassificationModelTest {
@Test
void getClassificationModel() {
}
@Test
void getDatas() {
}
@Test
void getDataToClass() {
}
@Test
void getType() {
}
}
\ No newline at end of file
package fr.univlille.sae.classification.model;
import javafx.scene.paint.Color;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class IrisTest {
Iris iris = new Iris(3.0, 2.8, 4.1, 1.9, "Setosa");
@Test
void getSepalWidth() {
assertEquals(3.0 , iris.getSepalWidth());
}
@Test
void getSepalLength() {
assertEquals(2.8, iris.getSepalLength());
}
@Test
void getPetalWidth() {
assertEquals(4.1, iris.getPetalWidth());
}
@Test
void getPetalLength() {
assertEquals(1.9, iris.getPetalLength());
}
@Test
void getVariety() {
assertEquals("Setosa", iris.getVariety());
}
@Test
void getDataType() {
assertEquals(3.0 , iris.getDataType("sepalWidth"));
assertEquals(2.8, iris.getDataType("sepalLength"));
assertEquals(4.1, iris.getDataType("petalWidth"));
assertEquals(1.9, iris.getDataType("petalLength"));
}
@Test
void getColor() {
assertEquals(Color.RED, iris.getColor());
}
@Test
void testToString() {
assertEquals("Iris{sepalWidth=3.0, sepalLength=2.8, petalWidth=4.1, petalLength=1.9}", iris.toString());
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment