public void ShouldNotAddPlayerIfPlayerWithSuchNameAlreadyExists() { HashSet <Player> players = new HashSet <Player>(); PlayersDisplayController controller = new PlayersDisplayController(players); string name = "Player"; controller.AddPlayer(name, "10"); controller.AddPlayer(name, "20"); Assert.AreEqual(1, players.Count); }
public void ShouldNotAddPlayerIfMoneyIsBelowMinimumBet() { HashSet <Player> players = new HashSet <Player>(); PlayersDisplayController controller = new PlayersDisplayController(players); controller.AddPlayer("Player", (Bet.MINIMUM_BET - 0.1m).ToString()); Assert.AreEqual(0, players.Count); }
public void ShouldAddPlayerIfMoneyContainsComma() { HashSet <Player> players = new HashSet <Player>(); PlayersDisplayController controller = new PlayersDisplayController(players); controller.AddPlayer("Player", "10,23"); Assert.AreEqual(1, players.Count); }
public void ShouldNotAddPlayerIfMoneyIsStringOfLetters() { HashSet <Player> players = new HashSet <Player>(); PlayersDisplayController controller = new PlayersDisplayController(players); controller.AddPlayer("Player", "sadfds"); Assert.AreEqual(0, players.Count); }