AuctionSniper.Acceptance.Tests.FakeAuctionServer.ReportPrice C# (CSharp) Method

ReportPrice() public method

public ReportPrice ( Money price, Money increment, string bidderId ) : void
price AuctionSniper.Domain.Money
increment AuctionSniper.Domain.Money
bidderId string
return void
        public void ReportPrice(Money price, Money increment, string bidderId)
        {
            var priceMsg =
                string.Format(@"SOLVersion: 1.1; Event: PRICE; CurrentPrice: {0}; Increment: {1}; Bidder: {2};",
                              price.Amount, increment.Amount, bidderId);
            auctionChat.SendMessageTo(singleMessageListener.SniperJid, priceMsg);
        }

Usage Example

Beispiel #1
0
        public void SniperMakeHigherBidButLoses()
        {
            auction.StartSellingItem();
            application.StartBiddingIn(auction);
            auction.HasReceivedJoinRequestFrom(ApplicationRunner.SniperXmppID);

            auction.ReportPrice(1000.Gbp(), 98.Gbp(), "other bidder");
            application.HasShownSniperIsBidding();
            auction.HasReceivedBid(1098.Gbp(), ApplicationRunner.SniperXmppID);


            auction.AnnounceClosed();
            application.ShowsSniperHasLostAuction();
        }