import org.junit.jupiter.api.Test; /** * Klasse GameTest * * Diese Klasse beinhaltet und führt alle Testfälle für die Klasse GameTest aus * */ class GameTest { @Test public void placeOneField() { Game game = new Game(); game.placeField(1); } @Test public void testGameShouldbeTie() { Game game = new Game(); game.placeField(1); game.placeField(2); game.placeField(3); game.placeField(5); game.placeField(4); game.placeField(6); game.placeField(8); game.placeField(7); game.placeField(9); } @Test public void Player1WinVariant147() { Game game = new Game(); game.placeField(1); game.placeField(2); game.placeField(4); game.placeField(3); game.placeField(7); } @Test public void Player2WinVariant147() { Game game = new Game(); game.placeField(2); game.placeField(1); game.placeField(3); game.placeField(4); game.placeField(6); game.placeField(7); } @Test public void Player1WinVariant123() { Game game = new Game(); game.placeField(1); game.placeField(4); game.placeField(2); game.placeField(5); game.placeField(3); } @Test public void Player2WinVariant123() { Game game = new Game(); game.placeField(4); game.placeField(1); game.placeField(5); game.placeField(2); game.placeField(7); game.placeField(3); } @Test public void Player1WinVariant159() { Game game = new Game(); game.placeField(1); game.placeField(3); game.placeField(5); game.placeField(2); game.placeField(9); } @Test public void Player2WinVariant159() { Game game = new Game(); game.placeField(3); game.placeField(1); game.placeField(2); game.placeField(5); game.placeField(6); game.placeField(9); } @Test public void Player1WinVariant258() { Game game = new Game(); game.placeField(2); game.placeField(3); game.placeField(5); game.placeField(4); game.placeField(8); } @Test public void Player2WinVariant258() { Game game = new Game(); game.placeField(1); game.placeField(2); game.placeField(4); game.placeField(5); game.placeField(3); game.placeField(8); } @Test public void Player1WinVariant369() { Game game = new Game(); game.placeField(3); game.placeField(1); game.placeField(6); game.placeField(2); game.placeField(9); } @Test public void Player2WinVariant369() { Game game = new Game(); game.placeField(1); game.placeField(3); game.placeField(2); game.placeField(6); game.placeField(4); game.placeField(9); } @Test public void Player1WinVariant456() { Game game = new Game(); game.placeField(4); game.placeField(1); game.placeField(5); game.placeField(2); game.placeField(6); } @Test public void Player2WinVariant456() { Game game = new Game(); game.placeField(7); game.placeField(4); game.placeField(1); game.placeField(5); game.placeField(2); game.placeField(6); } @Test public void Player1WinVariant789() { Game game = new Game(); game.placeField(7); game.placeField(2); game.placeField(8); game.placeField(1); game.placeField(9); } @Test public void Player2WinVariant789() { Game game = new Game(); game.placeField(1); game.placeField(7); game.placeField(2); game.placeField(8); game.placeField(4); game.placeField(9); } @Test public void Player1WinVariant357() { Game game = new Game(); game.placeField(3); game.placeField(2); game.placeField(5); game.placeField(4); game.placeField(7); } @Test public void Player2WinVariant357() { Game game = new Game(); game.placeField(1); game.placeField(3); game.placeField(2); game.placeField(5); game.placeField(4); game.placeField(7); } @Test public void changeLanguage() { Game game = new Game(); game.placeField(1); game.changeLanguage("en"); game.placeField(3); game.placeField(2); game.changeLanguage("vn"); game.placeField(5); game.placeField(4); game.changeLanguage("de"); game.placeField(7); } }