public void ListByTaxon_ReturnsConfiguredView() { var model = new DummyImageGalleryModel(); using (var controller = new DummyImageGalleryController(model)) { controller.ListTemplateName = "MyTestTemplate"; var result = (ViewResult)controller.ListByTaxon(null, null); Assert.AreEqual("List.MyTestTemplate", result.ViewName); } }
public void Details_ReturnsConfiguredView() { var model = new DummyImageGalleryModel(); using (var controller = new DummyImageGalleryController(model)) { controller.DetailTemplateName = "MyTestTemplate"; var result = (ViewResult)controller.Details(null); Assert.AreEqual("Detail.MyTestTemplate", result.ViewName); } }
public void GetLocations_ReturnsModelLocations() { var expectedLocations = new List <IContentLocationInfo>(); var model = new DummyImageGalleryModel(); model.DummyLocations = expectedLocations; using (var controller = new DummyImageGalleryController(model)) { var result = controller.GetLocations(); Assert.AreSame(expectedLocations, result); } }
public void Index_ReturnsConfiguredView() { var model = new DummyImageGalleryModel(); model.ItemsPerPage = 20; using (var controller = new DummyImageGalleryController(model)) { controller.ListTemplateName = "MyTestTemplate"; var result = (ViewResult)controller.Index(null); Assert.AreEqual("List.MyTestTemplate", result.ViewName); } }