Пример #1
0
        public async Task GetShouldGetEventCount()
        {
            await _actionSource.Dispatch(new Action(""));

            await _actionSource.Dispatch(new Action(""));

            var result = (OkObjectResult)await _controller.Get();

            Assert.AreEqual(2, ((MonitoringDto)result.Value).EventCount);
        }
Пример #2
0
        public async Task DispachShouldSendActionToAllListeners()
        {
            var    action         = new Action("");
            Action receivedAction = null;

            _actionSrouce.Listen <Action>(a => receivedAction = a);

            await _actionSrouce.Dispatch(action);

            Assert.AreSame(action, receivedAction);
        }