public async Task Detail_ShouldReturnView_WhenExecute(int id) { var alert = _alerts.First(m => m.Id == id); _alertMock.Setup(m => m.GetByIdAsync(id)).ReturnsAsync(alert); var result = await _alertController.Detail(id); Assert.IsType <ViewResult>(result); }