From da983e438bdc66f63d9ad64d630a0dc8f9bba1ff Mon Sep 17 00:00:00 2001 From: Imbus Date: Tue, 5 Dec 2023 13:14:25 +0100 Subject: [PATCH] Some example tests --- app/src/test/java/sudoku/AppTest.java | 14 -------------- app/src/test/java/sudoku/SolverTest.java | 12 ++++++++++++ 2 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 app/src/test/java/sudoku/AppTest.java create mode 100644 app/src/test/java/sudoku/SolverTest.java diff --git a/app/src/test/java/sudoku/AppTest.java b/app/src/test/java/sudoku/AppTest.java deleted file mode 100644 index d687b40..0000000 --- a/app/src/test/java/sudoku/AppTest.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * This Java source file was generated by the Gradle 'init' task. - */ -package sudoku; - -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - -class AppTest { - @Test void appHasAGreeting() { - App classUnderTest = new App(); - assertNotNull(classUnderTest.getGreeting(), "app should have a greeting"); - } -} diff --git a/app/src/test/java/sudoku/SolverTest.java b/app/src/test/java/sudoku/SolverTest.java new file mode 100644 index 0000000..ae16b4b --- /dev/null +++ b/app/src/test/java/sudoku/SolverTest.java @@ -0,0 +1,12 @@ +package sudoku; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +class SolverTest { + @Test void boardTest() { + Solver solver = new Solver(); + solver.solve(); + assertTrue(solver.isSolved()); + } +}