示例#1
0
        public void Create_Accumulate_AmountOfNOAndYESIsEqualToZERO()
        {
            var sut = new VotingByHandResultView(_votingByHands);

            Assert.AreEqual(6000, sut.StatementResults.Sum(s => s.AmtOfSharesYes));
            Assert.AreEqual(0, sut.StatementResults.Sum(s => s.AmtOfSharesNo));
            Assert.AreEqual(0, sut.StatementResults.Sum(s => s.AmtOfSharesOther));
        }
示例#2
0
        public void Create_Accumulate_YesRateShouldEqualTo100()
        {
            var sut = new VotingByHandResultView(_votingByHands);

            //Assert.AreEqual(3000, sut.StatementResults.Sum(s=>s.AmtOfSharesYes));
            Assert.AreEqual(100, sut.StatementResults.ElementAt(0).YesRate);
            Assert.AreEqual(0, sut.StatementResults.ElementAt(0).NoRate);
            Assert.AreEqual(0, sut.StatementResults.ElementAt(0).OtherRate);
        }
示例#3
0
        public void Create_Accumulate_AmountOfYESandNOIsNotEqualToZero()
        {
            foreach (var line in _votingByHands.ElementAt(0).VotingByHandLines)
            {
                line.VotingOption = VotingOption.No;
            }
            var sut = new VotingByHandResultView(_votingByHands);

            //Assert.AreEqual(3000, sut.StatementResults.Sum(s=>s.AmtOfSharesYes));
            Assert.AreEqual(4000, sut.StatementResults.Sum(s => s.AmtOfSharesYes));
            Assert.AreEqual(2000, sut.StatementResults.Sum(s => s.AmtOfSharesNo));
            Assert.AreEqual(0, sut.StatementResults.Sum(s => s.AmtOfSharesOther));
        }
示例#4
0
        public void Create_TotalNumberOfSharesShouldEqualTo3000()
        {
            var sut = new VotingByHandResultView(_votingByHands);

            Assert.AreEqual(3000, sut.TotalNumberOfShares);
        }
示例#5
0
        public void Create_StatementResultsCountShouldEqualToTwo()
        {
            var sut = new VotingByHandResultView(_votingByHands);

            Assert.AreEqual(2, sut.StatementResults.Count);
        }