public async Task Edit_ReturnsViewResult_WhenValidGuid() { this._todoItemServiceMock .Setup(service => service.GetItemAsync(It.IsAny <Guid>())) .ReturnsAsync(new TodoItem()); var result = await _todosController.Edit(Guid.NewGuid()); var viewResult = Assert.IsType <ViewResult>(result); Assert.IsAssignableFrom <EditViewModel>(viewResult.ViewData.Model); }