public async Task SuccessStoryController_Detail_Test10() { // Initialization SuccessStoryController ctl = new SuccessStoryController(); // To test if it is null var result = await ctl.Detail(101); Assert.IsNotNull(result); // To test if it is a HttpNotFoundResult when the id is invalid // Assert.IsInstanceOfType(result, typeof(HttpNotFoundResult)); }
public async Task SuccessStoryController_Detail_Test07() { // Initialization SuccessStoryController ctl = new SuccessStoryController(); // To test if it is null var result = await ctl.Detail(71); Assert.IsNotNull(result); // To test if it is a valid id var model = (StoryIndexViewModel)((ViewResult)result).Model; Assert.IsNotNull(model); }