From d0939f3cca846e2f10d16f3c7572ea68f164a616 Mon Sep 17 00:00:00 2001 From: Julius Dewender Date: Sun, 31 Jan 2021 18:14:27 +0100 Subject: [PATCH] transformed newGameInitializationFigurePositionsRooks to ParameterizedTest --- fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java b/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java index f680a43..eb35166 100644 --- a/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java +++ b/fh.fd.ci.client/src/test/java/de/fd/fh/GameTest.java @@ -3,6 +3,8 @@ package de.fd.fh; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.*; @@ -69,12 +71,16 @@ class GameTest } - @Test - void newGameInitializationFigurePositionsRooks() + @ParameterizedTest + // row, col + @CsvSource({ + "0, 0" + }) + void newGameInitializationFigurePositionsRooks(int row, int col) { // schwarzer Turm a8 assertEquals(new FigureRook().getClass(), - g.mField[Figure.fieldLength * 0 + 0].getClass()); + g.mField[Figure.fieldLength * row + col].getClass()); } @Test