public void NotifiesAuctionLostWhenAuctionCloses() { sniperListener.Expects.One.Method(x => x.AuctionLost()); IAuction nullAuction = null; var auctionSniper = new Domain.AuctionSniper(sniperListener.MockObject, nullAuction); auctionSniper.AuctionClosed(); }
public void TestSetup() { _mocks = new MockRepository(); _mockAuction = _mocks.StrictMock <IAuction>(); _mockSniperListener = _mocks.StrictMock <ISniperListener>(); _sniper = new Domain.AuctionSniper(_mockAuction, _mockSniperListener); }
public void BidsHigherAndReportsBiddingWhenNewPriceArrives() { var auction = mockery.CreateMock<IAuction>(); var currentPrice = 98.Gbp(); var increment = 20.Gbp(); auction.Expects.One.Method(x => x.Bid(currentPrice + increment)) .With(currentPrice+increment); sniperListener.Expects.One.Method(x => x.SniperIsBidding()); var auctionSniper = new Domain.AuctionSniper(sniperListener.MockObject, auction.MockObject); auctionSniper.CurrentPrice(currentPrice, increment); }
public void BidsHigherAndReportsBiddingWhenNewPriceArrives() { var auction = mockery.CreateMock <IAuction>(); var currentPrice = 98.Gbp(); var increment = 20.Gbp(); auction.Expects.One.Method(x => x.Bid(currentPrice + increment)) .With(currentPrice + increment); sniperListener.Expects.One.Method(x => x.SniperIsBidding()); var auctionSniper = new Domain.AuctionSniper(sniperListener.MockObject, auction.MockObject); auctionSniper.CurrentPrice(currentPrice, increment); }
public void TestSetup() { _mocks = new MockRepository(); _mockAuction = _mocks.StrictMock<IAuction>(); _mockSniperListener = _mocks.StrictMock<ISniperListener>(); _sniper = new Domain.AuctionSniper(_mockAuction, _mockSniperListener); }