16 writes to ViewData
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Controller.cs (1)
149ViewData = ViewData,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
ViewResultExecutorTest.cs (10)
42ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 64ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 88ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 120ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 154ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 188ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 216ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 258ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 288ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 312ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()),
ViewResultTest.cs (5)
41ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()) 97ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 137ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 177ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()), 226ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider()),
17 references to ViewData
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewResult.cs (1)
35public object? Model => ViewData?.Model;
ViewResultExecutor.cs (1)
155result.ViewData,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
ControllerTest.cs (12)
79Assert.Same(controller.ViewData, actualViewResult.ViewData); 81Assert.Null(actualViewResult.ViewData.Model); 103Assert.Same(controller.ViewData, actualViewResult.ViewData); 105Assert.Same(model, actualViewResult.ViewData.Model); 124Assert.Same(controller.ViewData, actualViewResult.ViewData); 126Assert.Null(actualViewResult.ViewData.Model); 146Assert.Same(controller.ViewData, actualViewResult.ViewData); 148Assert.Same(model, actualViewResult.ViewData.Model); 168Assert.Same(controller.ViewData, actualViewResult.ViewData); 170Assert.Same(model, actualViewResult.ViewData.Model); 190Assert.Same(controller.ViewData, actualViewResult.ViewData); 192Assert.Null(actualViewResult.ViewData.Model);
ControllerUnitTestabilityTests.cs (3)
31Assert.NotNull(viewResult.ViewData); 33Assert.Same(model, viewResult.ViewData.Model); 34Assert.Same(controller.ViewData, viewResult.ViewData);