예제 #1
0
 public void NotifiesAuctionLostWhenAuctionCloses()
 {
     sniperListener.Expects.One.Method(x => x.AuctionLost());
     IAuction nullAuction = null;
     var auctionSniper = new Domain.AuctionSniper(sniperListener.MockObject, nullAuction);
     auctionSniper.AuctionClosed();
 }
예제 #2
0
 public void TestSetup()
 {
     _mocks              = new MockRepository();
     _mockAuction        = _mocks.StrictMock <IAuction>();
     _mockSniperListener = _mocks.StrictMock <ISniperListener>();
     _sniper             = new Domain.AuctionSniper(_mockAuction, _mockSniperListener);
 }
예제 #3
0
        public void NotifiesAuctionLostWhenAuctionCloses()
        {
            sniperListener.Expects.One.Method(x => x.AuctionLost());
            IAuction nullAuction   = null;
            var      auctionSniper = new Domain.AuctionSniper(sniperListener.MockObject, nullAuction);

            auctionSniper.AuctionClosed();
        }
예제 #4
0
 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);
 }
예제 #5
0
        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);
 }