public void ValidResponseDetails() { // Create the Stats controller StatsController controller = new StatsController(databaseContext); // Call the Details page and wait for a response var resultTask = controller.Details(1); resultTask.Wait(); IActionResult result = resultTask.Result as IActionResult; // Check that the controller returned a valid response Assert.IsNotNull(result); }