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); }
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); }