src/test/java/de/uapcore/sudoku/SudokuTest.java

Wed, 26 Aug 2020 19:09:07 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 26 Aug 2020 19:09:07 +0200
changeset 25
569220009c54
parent 20
a95423d37588
permissions
-rw-r--r--

fixes wrong call of assertEquals()

package de.uapcore.sudoku;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import javax.swing.*;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

class SudokuTest {

    private Sudoku subject;

    @BeforeEach
    void init() {
        subject = new Sudoku();
    }

    @AfterEach
    void destroy() {
        subject.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        subject.dispose();
    }

    @Test
    void testDefaultCloseOperation() {
        assertEquals(WindowConstants.EXIT_ON_CLOSE, subject.getDefaultCloseOperation());
    }

    @Test
    void testMinimumSize() {
        assertEquals(subject.getSize(), subject.getMinimumSize());
    }

    @Test
    void testLocationByPlattform() {
        assertTrue(subject.isLocationByPlatform());
    }
}

mercurial