Ejemplo n.º 1
0
        public XMPPAuction(XmppClientConnection connection, Item item, IXMPPFailureReporter failureReporter)
        {
            this.failureReporter = failureReporter;
            AuctionMessageTranslator translator = translatorFor(connection);
            ChatManager chatManager             = new ChatManager(connection);

            Chat = chatManager.CreateChat(string.Format(ITEM_ID_AS_LOGIN, item.Identifier), connection.Server, AUCTION_RESOURCE,
                                          translator);
            auctionEventListeners.Add(chatDisconnectorFor(translator, Chat));
        }
        public void Setup()
        {
            listenerMock        = Substitute.For <IAuctionEventListener>();
            failureReporterMock = Substitute.For <IXMPPFailureReporter>();
            loggerMock          = Substitute.For <ILogger>();

            var list = new List <IAuctionEventListener>();

            list.Add(listenerMock);

            translator = new AuctionMessageTranslator(SNIPER_ID, list, failureReporterMock);
        }
Ejemplo n.º 3
0
 public XMPPAuctionHouse(XmppClientConnection connection)
 {
     this.connection      = connection;
     this.failureReporter = new LoggingXMPPFailureReporter(new Logger());
 }
Ejemplo n.º 4
0
 public AuctionMessageTranslator(string sniperId, List <IAuctionEventListener> auctionEventListeners, IXMPPFailureReporter failureReporter)
 {
     this.sniperId = sniperId;
     this.auctionEventListeners = auctionEventListeners;
     this.failureReporter       = failureReporter;
 }