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