Пример #1
0
        public void Setup()
        {
            _luckyBuyer = new Mock<IPerson>();
            _mockedDrawing = new Mock<ILotteryDrawing>();

            _lottery = new Lottery();
            _lottery.AppendFunds(Funding);

            _mockedDrawing
                .Setup(x => x.SoldTickets)
                .Returns(() => new List<LotteryTicket>());
            _mockedDrawing
                .Setup(x => x.Winner)
                .Returns(() => _luckyBuyer.Object);
            _mockedDrawing
                .Setup(x => x.Jackpot)
                .Returns(() => 500m);
            _mockedDrawing
                .Setup(x => x.LotteryType)
                .Returns(() => LotteryType.Normal);
        }