From 48177c625095c9769ac9b4c42dd284d6855b2a2b Mon Sep 17 00:00:00 2001 From: Felix Detig Date: Tue, 15 Feb 2022 00:23:31 +0100 Subject: [PATCH] =?UTF-8?q?Kein-Gewinner-Test=20f=C3=BCr=20TicTacToe.Spiel?= =?UTF-8?q?erInput?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MiniGamesTests/TicTacToeTest.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/BlazorSolution/MiniGamesTests/TicTacToeTest.cs b/BlazorSolution/MiniGamesTests/TicTacToeTest.cs index 0f14cf3..e98daaa 100644 --- a/BlazorSolution/MiniGamesTests/TicTacToeTest.cs +++ b/BlazorSolution/MiniGamesTests/TicTacToeTest.cs @@ -120,5 +120,25 @@ namespace MiniGamesTests // assert Assert.Equal(spiel.GewinnerIndex, erwarteterGewinnerIndex); } + + [Fact] + public void SpielerInput_KeinGewinnerTest() + { + // arrange + TicTacToe spiel = StandardSpiel(); + spiel.AktiverSpielerIndex = 0; + int erwarteterGewinnerIndex = -1; + + // act + spiel.SpielerInput(0); + spiel.SpielerInput(3); + spiel.SpielerInput(1); + spiel.SpielerInput(4); + spiel.SpielerInput(5); + spiel.SpielerInput(2); + + // assert + Assert.Equal(spiel.GewinnerIndex, erwarteterGewinnerIndex); + } } }