예제 #1
0
        public GamesHandlerTests()
        {
            _context             = new MyChessContextStub();
            _notificationHandler = new NotificationHandlerStub();
            var chessBoard = new ChessBoard(NullLogger <ChessBoard> .Instance);

            _gamesHandler = new GamesHandler(NullLogger <GamesHandler> .Instance, _context, _notificationHandler, chessBoard);
        }
        public async Task Process_WhenHandlerFailes_RetriesNotification(
            ReceivedNotificationStub notification,
            NotificationHandlerStub handler,
            ReceivedNotificationProcessor processor)
        {
            processor.RegisterHandlers(handler.YieldArray());

            await ProcessNotifications(notification, processor);

            Assert.True(notification.IsRetried);
        }