public void Initialize() { sniperListener = A.Fake<ISniperListener>(); auction = A.Fake<Auction>(x => x.WithArgumentsForConstructor(new object[] {string.Empty})); sniper = new AuctionSniperService(ITEM_ID, auction, sniperListener); }
public void JoinAuction(string itemId) { string auctionUser = string.Format(ConfigurationManager.AppSettings[CONFIG_AUCTION_USER_FORMAT], itemId); _auction = new Auction(auctionUser); _xmpp.AddMessageHandler(new AuctionMessageTranslator(_xmpp.GetUser(), new AuctionSniperService(itemId, _auction, SnipersStatus)), auctionUser); _auction.XmppService = _xmpp; _auction.Join(); }