Wed, 26 Aug 2020 19:09:07 +0200
fixes wrong call of assertEquals()
universe@20 | 1 | package de.uapcore.sudoku; |
universe@20 | 2 | |
universe@20 | 3 | import org.junit.jupiter.api.AfterEach; |
universe@20 | 4 | import org.junit.jupiter.api.BeforeEach; |
universe@20 | 5 | import org.junit.jupiter.api.Test; |
universe@20 | 6 | |
universe@20 | 7 | import javax.swing.*; |
universe@20 | 8 | |
universe@20 | 9 | import static org.junit.jupiter.api.Assertions.assertEquals; |
universe@20 | 10 | import static org.junit.jupiter.api.Assertions.assertTrue; |
universe@20 | 11 | |
universe@20 | 12 | class SudokuTest { |
universe@20 | 13 | |
universe@20 | 14 | private Sudoku subject; |
universe@20 | 15 | |
universe@20 | 16 | @BeforeEach |
universe@20 | 17 | void init() { |
universe@20 | 18 | subject = new Sudoku(); |
universe@20 | 19 | } |
universe@20 | 20 | |
universe@20 | 21 | @AfterEach |
universe@20 | 22 | void destroy() { |
universe@20 | 23 | subject.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
universe@20 | 24 | subject.dispose(); |
universe@20 | 25 | } |
universe@20 | 26 | |
universe@20 | 27 | @Test |
universe@20 | 28 | void testDefaultCloseOperation() { |
universe@20 | 29 | assertEquals(WindowConstants.EXIT_ON_CLOSE, subject.getDefaultCloseOperation()); |
universe@20 | 30 | } |
universe@20 | 31 | |
universe@20 | 32 | @Test |
universe@20 | 33 | void testMinimumSize() { |
universe@20 | 34 | assertEquals(subject.getSize(), subject.getMinimumSize()); |
universe@20 | 35 | } |
universe@20 | 36 | |
universe@20 | 37 | @Test |
universe@20 | 38 | void testLocationByPlattform() { |
universe@20 | 39 | assertTrue(subject.isLocationByPlatform()); |
universe@20 | 40 | } |
universe@20 | 41 | } |