diff --git a/BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs b/BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs index 30e24c1..36ea54a 100644 --- a/BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs +++ b/BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs @@ -263,5 +263,43 @@ namespace MiniGamesTests // assert Assert.Equal(erwarteterGewinner, erhaltenerGewinner); } + + [Theory] + [InlineData( + 0, TicTacToeBrett.LEER, 0, + TicTacToeBrett.LEER, TicTacToeBrett.LEER, TicTacToeBrett.LEER, + 0, TicTacToeBrett.LEER, 0 + )] + [InlineData( + 1, 1, TicTacToeBrett.LEER, + 1, 1, TicTacToeBrett.LEER, + TicTacToeBrett.LEER, TicTacToeBrett.LEER, TicTacToeBrett.LEER + )] + [InlineData( + 2, TicTacToeBrett.LEER, TicTacToeBrett.LEER, + 2, TicTacToeBrett.LEER, 2, + TicTacToeBrett.LEER, 2, 2 + )] + [InlineData( + 1, 1, 2, + 1, 3, 2, + 2, 3, 3 + )] + public void Gewinner_NichtVolleReihenTest( + int a = TicTacToeBrett.LEER, int b = TicTacToeBrett.LEER, int c = TicTacToeBrett.LEER, + int d = TicTacToeBrett.LEER, int e = TicTacToeBrett.LEER, int f = TicTacToeBrett.LEER, + int g = TicTacToeBrett.LEER, int h = TicTacToeBrett.LEER, int i = TicTacToeBrett.LEER + ) + { + // arrange + TicTacToeBrett brett = TestBrett(a, b, c, d, e, f, g, h, i); + int erwarteterGewinner = TicTacToeBrett.LEER; + + // act + int erhaltenerGewinner = brett.Gewinner(); + + // assert + Assert.Equal(erwarteterGewinner, erhaltenerGewinner); + } } }