public void TestErrors() { Action act = () => MatchesCommand.GetUniqueMatches(GeneratePlayers(3)); act.Should().Throw <Exception>(); act = () => MatchesCommand.GetUniqueMatches(GeneratePlayers(1)); act.Should().Throw <Exception>(); act = () => MatchesCommand.GetUniqueMatches(GeneratePlayers(0)); act.Should().Throw <Exception>(); act = () => MatchesCommand.GetUniqueMatches(GeneratePlayers(8)); act.Should().Throw <Exception>(); var players = GeneratePlayers(1); players.Add(string.Empty); players.Add(null); players.Add(" "); act = () => MatchesCommand.GetUniqueMatches(players); act.Should().Throw <Exception>(); players = GeneratePlayers(0); players.Add("1"); players.Add("1"); players.Add("1"); players.Add("1"); act = () => MatchesCommand.GetUniqueMatches(players); act.Should().Throw <Exception>(); }
public void Test2Player() { var players = GeneratePlayers(2); var matches = MatchesCommand.GetUniqueMatches(players); VerifyMatch(matches, players, 1); }