public async void Test_Index_Returns_A_ViewResult_Alerte() { //Arrange //Act var result = await _alertesController.Index(); //Assert Assert.IsType <ViewResult>(result); }
public async Task Index_Last_Alert_Should_Be_In_View() { var result = await controller.Index() as ViewResult; var viewResult = Assert.IsType <ViewResult>(result); Assert.Contains(mockRepo._alertes.ToString(), viewResult.ViewData.Model.ToString()); }
public async Task Test_Index_Model_Is_An_Enumerable_Model_Of_Joueurs() { var mockRepo = new MockAlertesRepository(); var controller = new AlertesController(mockRepo); var result = await controller.Index() as ViewResult; Assert.IsAssignableFrom <IEnumerable <Alerte> >(result.ViewData.Model); }
public async Task Test_Index_Returns_A_ViewResult() { var mockRepo = new MockAlertesRepository(); var controller = new AlertesController(mockRepo); var result = await controller.Index(); Assert.IsType <ViewResult>(result); }