public void GetPropertiesShouldNotThrowExceptionForPrivateProperties() { MyApplication.StartsFrom<DefaultStartup>(); var helper = TempDataPropertyHelper.GetTempDataProperties<PrivatePocoController>(); var controller = new PrivatePocoController(TestServiceProvider.Global); var gotTempData = helper.TempDataGetter(controller); Assert.NotNull(gotTempData); }
public void GetPropertiesShouldNotThrowExceptionForPrivateProperties() { MyApplication.StartsFrom <DefaultStartup>(); var helper = TempDataPropertyHelper.GetTempDataProperties <PrivatePocoController>(); var controller = new PrivatePocoController(TestServiceProvider.Global); var gotTempData = helper.TempDataGetter(controller); Assert.NotNull(gotTempData); }
public void GetPropertiesShouldNotThrowExceptionForPrivateProperties() { MyMvc.IsUsingDefaultConfiguration(); var helper = ViewFeaturesControllerPropertyHelper.GetViewFeatureProperties <PrivatePocoController>(); var controller = new PrivatePocoController(TestServiceProvider.Global); var gotTempData = helper.TempDataGetter(controller); Assert.NotNull(gotTempData); }
public void ViewDataGetterShouldThrowInvalidOperationExceptionForPrivatePocoController() { MyApplication.StartsFrom <DefaultStartup>(); var helper = ViewDataPropertyHelper.GetViewDataProperties <PrivatePocoController>(); var controller = new PrivatePocoController(TestServiceProvider.Global); Test.AssertException <InvalidOperationException>( () => { helper.ViewDataGetter(controller); }, "ViewDataDictionary could not be found on the provided PrivatePocoController. The property should be specified manually by providing component instance or using the specified helper methods."); }
public void GetPropertiesShouldNotThrowExceptionForPrivateProperties() { MyMvc.IsUsingDefaultConfiguration(); var helper = ViewFeaturesControllerPropertyHelper.GetViewFeatureProperties<PrivatePocoController>(); var controller = new PrivatePocoController(TestServiceProvider.Global); var gotTempData = helper.TempDataGetter(controller); Assert.NotNull(gotTempData); }