コード例 #1
0
        public void WagerChallenge_IsApproved_ReturnFalse(bool[] approved)
        {
            //Arrange
            var wager = new WagerChallenge
            {
                Challengers = new List <WagerChallengeBid>()
            };

            foreach (bool b in approved)
            {
                wager.Challengers.Add(new WagerChallengeBid {
                    Approved = b
                });
            }
            //Act
            var result = wager.IsApproved();

            //Assert
            Assert.False(result);
        }
コード例 #2
0
        public void WagerChallenge_IsApproved_ReturnTrue(int approvedCount)
        {
            //Arrange
            var wager = new WagerChallenge
            {
                Challengers = new List <WagerChallengeBid>()
            };

            for (int i = 0; i < approvedCount; i++)
            {
                wager.Challengers.Add(new WagerChallengeBid {
                    Approved = true
                });
            }
            //Act
            var result = wager.IsApproved();

            //Assert
            Assert.True(result);
        }