Browse Source

Naiver TicTacToeBrett.Gewinner-Test

feature/tictactoe
Felix Detig 3 years ago
parent
commit
85e8abfefe
  1. 5
      BlazorSolution/MiniGames/Shared/Models/TicTacToeBrett.cs
  2. 14
      BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs

5
BlazorSolution/MiniGames/Shared/Models/TicTacToeBrett.cs

@ -78,5 +78,10 @@ namespace MiniGames.Shared.Models
return true;
}
public int Gewinner()
{
return LEER;
}
}
}

14
BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs

@ -183,5 +183,19 @@ namespace MiniGamesTests
// assert
Assert.Equal(erwartetVoll, erhaltenVoll);
}
[Fact]
public void Gewinner_LeeresFeldTest()
{
// arrange
TicTacToeBrett brett = TestBrett();
int erwarteterGewinner = TicTacToeBrett.LEER;
// act
int erhaltenerGewinner = brett.Gewinner();
// assert
Assert.Equal(erwarteterGewinner, erhaltenerGewinner);
}
}
}
Loading…
Cancel
Save