Example #1
0
        public AuctionScenariosSteps()
        {
            _me          = Buyers.Single(buyer => buyer.Name == "Thiago Lunardi");
            _auctionRoom = Rooms.Single(room => room.RoomNumber == 7);

            _startingBid = _auctionRoom.NextPrice();

            var attendants = Buyers.Where(b => b.Name != _me.Name).ToList();

            attendants.ForEach(a => _auctionRoom.TryEnterAsAttendant(a));

            _previousBids = attendants.Select(a => a.CreateBid(_auctionRoom, _startingBid, BidType.Online));
            Thread.Sleep(500); // To be clear that any bid after here will be a lazy bid
        }
Example #2
0
        public void BuyerStateChanged(BuyerSnapshot snapshot)
        {
            BuyerViewModel viewModel = Buyers.Single(x => x.ItemId == snapshot.ItemId);

            viewModel.UpdateState(snapshot);
        }