diff --git a/src/test/java/fr/univlille/sae/classification/model/ClassificationModelTest.java b/src/test/java/fr/univlille/sae/classification/model/ClassificationModelTest.java new file mode 100644 index 0000000000000000000000000000000000000000..e8ed4599a7127372e7758bd7e2e83ac37258e21d --- /dev/null +++ b/src/test/java/fr/univlille/sae/classification/model/ClassificationModelTest.java @@ -0,0 +1,24 @@ +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 diff --git a/src/test/java/fr/univlille/sae/classification/model/IrisTest.java b/src/test/java/fr/univlille/sae/classification/model/IrisTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9ca8f9f19183ee5b1b5e42fd41ceb2c534d0cf0f --- /dev/null +++ b/src/test/java/fr/univlille/sae/classification/model/IrisTest.java @@ -0,0 +1,54 @@ +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