public void GetRound_ReturnsCorrectMatchList()
        {
            List <IPlayer> pList = new List <IPlayer>();

            for (int i = 0; i < 8; ++i)
            {
                Mock <IPlayer> moq = new Mock <IPlayer>();
                moq.Setup(p => p.Id).Returns(i);
                pList.Add(moq.Object);
            }
            IBracket b = new SingleElimBracket(pList);

            Assert.AreEqual(4, b.GetRound(1).Count);
        }
        public void GetRound_ThrowsInvalidIndex_WithBadParam()
        {
            List <IPlayer> pList = new List <IPlayer>();

            for (int i = 0; i < 8; ++i)
            {
                Mock <IPlayer> moq = new Mock <IPlayer>();
                moq.Setup(p => p.Id).Returns(i);
                pList.Add(moq.Object);
            }
            IBracket b = new SingleElimBracket(pList);
            var      l = b.GetRound(-1);

            Assert.AreEqual(1, 2);
        }
        public void SMGFWR_UpdatesSingleElimBrackets()
        {
            List <IPlayer> pList = new List <IPlayer>();

            for (int i = 1; i <= 16; ++i)
            {
                Mock <IPlayer> moq = new Mock <IPlayer>();
                moq.Setup(p => p.Id).Returns(i);
                pList.Add(moq.Object);
            }
            IBracket b = new SingleElimBracket(pList);

            int games = 5;

            b.SetMaxGamesForWholeRound(2, games);
            Assert.AreEqual(games, b.GetRound(2)[1].MaxGames);
        }