public void ViewDataDictionaryIsWrapped() { // Arrange DynamicViewPage page = new DynamicViewPage(); // Act & Assert Assert.AreEqual("Microsoft.Web.Mvc.DynamicViewDataDictionary", page.ViewData.GetType().FullName); }
public void Generic_ViewDataDictionaryIsWrapped() { // Arrange DynamicViewPage<object> page = new DynamicViewPage<object>(); // Act & Assert Assert.AreEqual("Microsoft.Web.Mvc.AspNet4.DynamicViewDataDictionary", page.ViewData.GetType().FullName); }
public void AnonymousObjectsAreWrapped() { // Arrange DynamicViewPage page = new DynamicViewPage(); page.ViewData.Model = new { foo = "Hello world!" }; // Act & Assert Assert.AreEqual("Microsoft.Web.Mvc.AspNet4.DynamicReflectionObject", page.Model.GetType().FullName); }
public void NonAnonymousObjectsAreNotWrapped() { // Arrange DynamicViewPage page = new DynamicViewPage(); page.ViewData.Model = "Hello world!"; // Act & Assert Assert.AreEqual(typeof(string), page.Model.GetType()); }
public void Generic_ViewDataDictionaryIsWrapped() { // Arrange DynamicViewPage <object> page = new DynamicViewPage <object>(); // Act & Assert Assert.AreEqual("Microsoft.Web.Mvc.DynamicViewDataDictionary", page.ViewData.GetType().FullName); }
public void ViewDataDictionaryIsWrapped() { // Arrange DynamicViewPage page = new DynamicViewPage(); // Act & Assert Assert.Equal("Microsoft.Web.Mvc.DynamicViewDataDictionary", page.ViewData.GetType().FullName); }
public void AnonymousObjectsAreWrapped() { // Arrange DynamicViewPage page = new DynamicViewPage(); page.ViewData.Model = new { foo = "Hello world!" }; // Act & Assert Assert.AreEqual("Microsoft.Web.Mvc.DynamicReflectionObject", page.Model.GetType().FullName); }