コード例 #1
0
 public void TestSetup()
 {
     _mocks              = new MockRepository();
     _mockAuction        = _mocks.StrictMock <IAuction>();
     _mockSniperListener = _mocks.StrictMock <ISniperListener>();
     _sniper             = new Domain.AuctionSniper(_mockAuction, _mockSniperListener);
 }
コード例 #2
0
        public AuctionSniperService(string itemId, Auction auction, ISniperListener listener)
        {
            _itemId = itemId;
            _auction = auction;
            _listener = listener;

            _snapshot = SniperSnapshot.Joining(itemId);
            _listener.AddSniper(_snapshot);
        }
コード例 #3
0
        public AuctionSniperService(string itemId, Auction auction, ISniperListener listener)
        {
            _itemId   = itemId;
            _auction  = auction;
            _listener = listener;

            _snapshot = SniperSnapshot.Joining(itemId);
            _listener.AddSniper(_snapshot);
        }
コード例 #4
0
        public void Setup()
        {
            sniperListener = Substitute.For <ISniperListener>();
            auction        = Substitute.For <IAuction>();
            item           = new Item("test item", Int32.MaxValue);

            sniper = new AuctionSniper(item, auction);
            sniper.AddSniperListener(sniperListener);
        }
コード例 #5
0
            public XMPPAuction(IChat inChat, ISniperListener inListener)
            {
                this.NotToBeGCD            = inChat;
                this.NotToBeGCD.Translator = new AuctionMessageTranslator(
                    inChat.FromId,
                    new AuctionSniper.Core.AuctionSniper(this, inListener)
                    );

                mListener = inListener;
            }
コード例 #6
0
 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);
 }
コード例 #7
0
ファイル: Sniper.cs プロジェクト: korulis/GOOS-book-code
 public void AddSniperListener(ISniperListener sniperListener)
 {
     _sniperListener = sniperListener;
 }
コード例 #8
0
 public AuctionSniper(ISniperListener sniperListener, IAuction auction)
 {
     this.sniperListener = sniperListener;
     this.auction = auction;
 }
コード例 #9
0
            public XMPPAuction(IChat inChat, ISniperListener inListener)
            {
                this.NotToBeGCD = inChat;
                this.NotToBeGCD.Translator = new AuctionMessageTranslator(
                    inChat.FromId,
                    new AuctionSniper.Core.AuctionSniper(this, inListener)
                );

                mListener = inListener;
            }
コード例 #10
0
 public AuctionSniper(IAuction inAuction, ISniperListener inListener)
 {
     mAuction  = inAuction;
     mListener = inListener;
 }
コード例 #11
0
 public void TestSetup()
 {
     _mocks = new MockRepository();
     _mockAuction = _mocks.StrictMock<IAuction>();
     _mockSniperListener = _mocks.StrictMock<ISniperListener>();
     _sniper = new Domain.AuctionSniper(_mockAuction, _mockSniperListener);
 }
コード例 #12
0
 public void AddSniperListener(ISniperListener sniperListener)
 {
     this.sniperListener = sniperListener;
 }
コード例 #13
0
 public AuctionSniper(IAuction auction, ISniperListener sniperListener)
 {
     _auction        = auction;
     _sniperListener = sniperListener;
 }
コード例 #14
0
ファイル: AuctionSniper.cs プロジェクト: korulis/goos-dot-net
 public AuctionSniper(ISniperListener sniperListener, IAuction auction)
 {
     this.sniperListener = sniperListener;
     this.auction        = auction;
 }
コード例 #15
0
 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);
 }