public void GSLCreateBracket_GroupStageStoresAllEightPlayers() { List <IPlayer> pList = new List <IPlayer>(); for (int i = 1; i <= 8; ++i) { Mock <IPlayer> moq = new Mock <IPlayer>(); moq.Setup(p => p.Id).Returns(i); pList.Add(moq.Object); } IBracket b = new GSLGroups(pList, 2); Assert.AreEqual(pList.Count, b.NumberOfPlayers()); }
public void GSLAddGame_CorrectlyAddsGamesToAllRemainingMatches() { List <IPlayer> pList = new List <IPlayer>(); for (int i = 1; i <= 8; ++i) { Mock <IPlayer> moq = new Mock <IPlayer>(); moq.Setup(p => p.Id).Returns(i); pList.Add(moq.Object); } IBracket b = new GSLGroups(pList, 2); for (int n = 1; n <= b.NumberOfMatches; ++n) { b.AddGame(n, 1, 0, PlayerSlot.Defender); } Assert.AreEqual(b.NumberOfPlayers(), b.Rankings.Count); }