Esempio n. 1
0
        public async Task InvokesHandler()
        {
            var logs = new FilterLog[] { new FilterLog(), new FilterLog() };

            var logsHandled = new List <FilterLog>();

            _handler
            .Setup(m => m.HandleAsync(_eventSubscription, _eventAbis, logs))
            .Returns <IEventSubscription, EventABI[], FilterLog[]>((subscription, abi, l) =>
            {
                logsHandled.AddRange(l);
                return(Task.CompletedTask);
            });

            await _eventSubscription.ProcessLogsAsync(logs);

            Assert.Equal(logs, logsHandled);
        }