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