From 3a5fc02a1c6a53e6e98e3be196d618f4341dcc3b Mon Sep 17 00:00:00 2001
From: Edvard <edvardee@stud.ntnu.no>
Date: Sun, 19 May 2024 20:25:49 +0200
Subject: [PATCH] Generate and refactor unit tests

---
 .../model/chaos/ChaosCanvasTest.java          | 78 +++++++++++++++++++
 .../ChaosGameDescriptionFactoryTest.java      | 12 +++
 .../model/chaos/ChaosGameDescriptionTest.java | 36 +++++++++
 .../model/chaos/ChaosGameFileHandlerTest.java | 26 +++++++
 .../chaosgame/model/chaos/ChaosGameTest.java  | 78 +++++++++++++++++++
 .../model/chaos/ExploreGameTest.java          | 58 ++++++++++++++
 .../{ => model}/linalg/ComplexTest.java       |  2 +-
 .../{ => model}/linalg/Matrix2x2Test.java     |  2 +-
 .../{ => model}/linalg/Vector2DTest.java      |  2 +-
 .../AffineTransform2DTest.java                |  2 +-
 .../transformations/ExploreJuliaTest.java     | 16 ++++
 .../transformations/JuliaTransformTest.java   |  2 +-
 12 files changed, 309 insertions(+), 5 deletions(-)
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ChaosCanvasTest.java
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionFactoryTest.java
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionTest.java
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ChaosGameFileHandlerTest.java
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ChaosGameTest.java
 create mode 100644 src/test/java/org/example/chaosgame/model/chaos/ExploreGameTest.java
 rename src/test/java/org/example/chaosgame/{ => model}/linalg/ComplexTest.java (95%)
 rename src/test/java/org/example/chaosgame/{ => model}/linalg/Matrix2x2Test.java (97%)
 rename src/test/java/org/example/chaosgame/{ => model}/linalg/Vector2DTest.java (97%)
 rename src/test/java/org/example/chaosgame/{ => model}/transformations/AffineTransform2DTest.java (92%)
 create mode 100644 src/test/java/org/example/chaosgame/model/transformations/ExploreJuliaTest.java
 rename src/test/java/org/example/chaosgame/{ => model}/transformations/JuliaTransformTest.java (92%)

diff --git a/src/test/java/org/example/chaosgame/model/chaos/ChaosCanvasTest.java b/src/test/java/org/example/chaosgame/model/chaos/ChaosCanvasTest.java
new file mode 100644
index 0000000..6df0e36
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ChaosCanvasTest.java
@@ -0,0 +1,78 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ChaosCanvasTest {
+
+  @BeforeEach
+  void setUp() {
+  }
+
+  @AfterEach
+  void tearDown() {
+  }
+
+  @Test
+  void getPixel() {
+  }
+
+  @Test
+  void putPixel() {
+  }
+
+  @Test
+  void testPutPixel() {
+  }
+
+  @Test
+  void transformIndicesToCoords() {
+  }
+
+  @Test
+  void getCanvasArray() {
+  }
+
+  @Test
+  void getWidth() {
+  }
+
+  @Test
+  void getHeight() {
+  }
+
+  @Test
+  void getMinCoords() {
+  }
+
+  @Test
+  void getMaxCoords() {
+  }
+
+  @Test
+  void setMinCoords() {
+  }
+
+  @Test
+  void setMaxCoords() {
+  }
+
+  @Test
+  void setTransformCoordsToIndices() {
+  }
+
+  @Test
+  void clearCanvas() {
+  }
+
+  @Test
+  void setWidth() {
+  }
+
+  @Test
+  void setHeight() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionFactoryTest.java b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionFactoryTest.java
new file mode 100644
index 0000000..651d06a
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionFactoryTest.java
@@ -0,0 +1,12 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ChaosGameDescriptionFactoryTest {
+
+  @Test
+  void get() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionTest.java b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionTest.java
new file mode 100644
index 0000000..fc302e0
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameDescriptionTest.java
@@ -0,0 +1,36 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ChaosGameDescriptionTest {
+
+  @Test
+  void getMinCoords() {
+  }
+
+  @Test
+  void getMaxCoords() {
+  }
+
+  @Test
+  void setMinCoords() {
+  }
+
+  @Test
+  void setMaxCoords() {
+  }
+
+  @Test
+  void getTransforms() {
+  }
+
+  @Test
+  void setTransforms() {
+  }
+
+  @Test
+  void getProbabilities() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/model/chaos/ChaosGameFileHandlerTest.java b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameFileHandlerTest.java
new file mode 100644
index 0000000..90309ec
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameFileHandlerTest.java
@@ -0,0 +1,26 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ChaosGameFileHandlerTest {
+
+  @BeforeEach
+  void setUp() {
+  }
+
+  @AfterEach
+  void tearDown() {
+  }
+
+  @Test
+  void readFromFile() {
+  }
+
+  @Test
+  void writeToFile() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/model/chaos/ChaosGameTest.java b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameTest.java
new file mode 100644
index 0000000..4bf4f07
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ChaosGameTest.java
@@ -0,0 +1,78 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ChaosGameTest {
+
+  @BeforeEach
+  void setUp() {
+  }
+
+  @AfterEach
+  void tearDown() {
+  }
+
+  @Test
+  void getInstance() {
+  }
+
+  @Test
+  void getCanvas() {
+  }
+
+  @Test
+  void getDescription() {
+  }
+
+  @Test
+  void getSteps() {
+  }
+
+  @Test
+  void getTotalSteps() {
+  }
+
+  @Test
+  void setSteps() {
+  }
+
+  @Test
+  void setTotalSteps() {
+  }
+
+  @Test
+  void addTotalSteps() {
+  }
+
+  @Test
+  void resetTotalSteps() {
+  }
+
+  @Test
+  void runSteps() {
+  }
+
+  @Test
+  void setChaosGameDescription() {
+  }
+
+  @Test
+  void setChaosCanvas() {
+  }
+
+  @Test
+  void registerObserver() {
+  }
+
+  @Test
+  void removeObserver() {
+  }
+
+  @Test
+  void notifyObservers() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/model/chaos/ExploreGameTest.java b/src/test/java/org/example/chaosgame/model/chaos/ExploreGameTest.java
new file mode 100644
index 0000000..7c6d541
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/chaos/ExploreGameTest.java
@@ -0,0 +1,58 @@
+package org.example.chaosgame.model.chaos;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ExploreGameTest {
+
+  @BeforeEach
+  void setUp() {
+  }
+
+  @AfterEach
+  void tearDown() {
+  }
+
+  @Test
+  void exploreFractals() {
+  }
+
+  @Test
+  void setChaosCanvas() {
+  }
+
+  @Test
+  void setExploreGame() {
+  }
+
+  @Test
+  void getCanvas() {
+  }
+
+  @Test
+  void getDescription() {
+  }
+
+  @Test
+  void registerObserver() {
+  }
+
+  @Test
+  void removeObserver() {
+  }
+
+  @Test
+  void notifyObservers() {
+  }
+
+  @Test
+  void call() {
+  }
+
+  @Test
+  void stopTask() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/linalg/ComplexTest.java b/src/test/java/org/example/chaosgame/model/linalg/ComplexTest.java
similarity index 95%
rename from src/test/java/org/example/chaosgame/linalg/ComplexTest.java
rename to src/test/java/org/example/chaosgame/model/linalg/ComplexTest.java
index 6297a60..5268063 100644
--- a/src/test/java/org/example/chaosgame/linalg/ComplexTest.java
+++ b/src/test/java/org/example/chaosgame/model/linalg/ComplexTest.java
@@ -1,4 +1,4 @@
-package org.example.chaosgame.linalg;
+package org.example.chaosgame.model.linalg;
 
 import org.example.chaosgame.model.linalg.Complex;
 import org.junit.jupiter.api.*;
diff --git a/src/test/java/org/example/chaosgame/linalg/Matrix2x2Test.java b/src/test/java/org/example/chaosgame/model/linalg/Matrix2x2Test.java
similarity index 97%
rename from src/test/java/org/example/chaosgame/linalg/Matrix2x2Test.java
rename to src/test/java/org/example/chaosgame/model/linalg/Matrix2x2Test.java
index 7ae36e3..664fdc2 100644
--- a/src/test/java/org/example/chaosgame/linalg/Matrix2x2Test.java
+++ b/src/test/java/org/example/chaosgame/model/linalg/Matrix2x2Test.java
@@ -1,4 +1,4 @@
-package org.example.chaosgame.linalg;
+package org.example.chaosgame.model.linalg;
 
 import org.example.chaosgame.model.linalg.Matrix2x2;
 import org.example.chaosgame.model.linalg.Vector2D;
diff --git a/src/test/java/org/example/chaosgame/linalg/Vector2DTest.java b/src/test/java/org/example/chaosgame/model/linalg/Vector2DTest.java
similarity index 97%
rename from src/test/java/org/example/chaosgame/linalg/Vector2DTest.java
rename to src/test/java/org/example/chaosgame/model/linalg/Vector2DTest.java
index 5fecb5d..87c78e1 100644
--- a/src/test/java/org/example/chaosgame/linalg/Vector2DTest.java
+++ b/src/test/java/org/example/chaosgame/model/linalg/Vector2DTest.java
@@ -1,4 +1,4 @@
-package org.example.chaosgame.linalg;
+package org.example.chaosgame.model.linalg;
 
 import org.example.chaosgame.model.linalg.Vector2D;
 import org.junit.jupiter.api.*;
diff --git a/src/test/java/org/example/chaosgame/transformations/AffineTransform2DTest.java b/src/test/java/org/example/chaosgame/model/transformations/AffineTransform2DTest.java
similarity index 92%
rename from src/test/java/org/example/chaosgame/transformations/AffineTransform2DTest.java
rename to src/test/java/org/example/chaosgame/model/transformations/AffineTransform2DTest.java
index e19e189..3ac169c 100644
--- a/src/test/java/org/example/chaosgame/transformations/AffineTransform2DTest.java
+++ b/src/test/java/org/example/chaosgame/model/transformations/AffineTransform2DTest.java
@@ -1,4 +1,4 @@
-package org.example.chaosgame.transformations;
+package org.example.chaosgame.model.transformations;
 
 import org.example.chaosgame.model.linalg.Matrix2x2;
 import org.example.chaosgame.model.linalg.Vector2D;
diff --git a/src/test/java/org/example/chaosgame/model/transformations/ExploreJuliaTest.java b/src/test/java/org/example/chaosgame/model/transformations/ExploreJuliaTest.java
new file mode 100644
index 0000000..4c7a014
--- /dev/null
+++ b/src/test/java/org/example/chaosgame/model/transformations/ExploreJuliaTest.java
@@ -0,0 +1,16 @@
+package org.example.chaosgame.model.transformations;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ExploreJuliaTest {
+
+  @Test
+  void getComplex() {
+  }
+
+  @Test
+  void transform() {
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/example/chaosgame/transformations/JuliaTransformTest.java b/src/test/java/org/example/chaosgame/model/transformations/JuliaTransformTest.java
similarity index 92%
rename from src/test/java/org/example/chaosgame/transformations/JuliaTransformTest.java
rename to src/test/java/org/example/chaosgame/model/transformations/JuliaTransformTest.java
index f1807cd..b0e652b 100644
--- a/src/test/java/org/example/chaosgame/transformations/JuliaTransformTest.java
+++ b/src/test/java/org/example/chaosgame/model/transformations/JuliaTransformTest.java
@@ -1,4 +1,4 @@
-package org.example.chaosgame.transformations;
+package org.example.chaosgame.model.transformations;
 
 import org.example.chaosgame.model.linalg.Complex;
 import org.example.chaosgame.model.linalg.Vector2D;
-- 
GitLab