Browse Source

refactor SpielerErstellen Code

feature/uno
Dato88 2 years ago
parent
commit
b727af69e3
  1. 3
      BlazorSolution/MiniGames/Client/ViewModel/Uno.cs
  2. 5
      BlazorSolution/MiniGamesTests/UnoTest.cs

3
BlazorSolution/MiniGames/Client/ViewModel/Uno.cs

@ -73,7 +73,8 @@ namespace MiniGames.Client.ViewModel
new HandKartenModel
{
Id = Spieler.Count() + 1,
Name = _spielerName
Name = _spielerName,
KartenModels = new()
});
}

5
BlazorSolution/MiniGamesTests/UnoTest.cs

@ -107,10 +107,15 @@ namespace MiniGamesTests
//assert
Assert.Equal(_spielerEinsName, ergebnis[0].Name);
Assert.Equal(_spielerEinsId, ergebnis[0].Id);
Assert.NotNull(ergebnis[0].KartenModels);
Assert.Equal(_spielerZweiName, ergebnis[1].Name);
Assert.Equal(_spielerZweiId, ergebnis[1].Id);
Assert.NotNull(ergebnis[1].KartenModels);
Assert.Equal(_spielerDreiName, ergebnis[2].Name);
Assert.Equal(_spielerDreiId, ergebnis[2].Id);
Assert.NotNull(ergebnis[2].KartenModels);
}

Loading…
Cancel
Save