5 instantiations of TestModel
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
17 references to TestModel
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (17)
ViewDataDictionaryTest.cs (17)
72.Setup(m => m.GetMetadataForType(typeof(TestModel)))
73.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(TestModel)))
75var viewData = new TestViewDataDictionary(metadataProvider.Object, typeof(TestModel));
76var model = new TestModel();
83metadataProvider.Verify(m => m.GetMetadataForType(typeof(TestModel)), Times.Once());
96.Setup(m => m.GetMetadataForType(typeof(TestModel)))
97.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(TestModel)))
100var model = new TestModel();
112metadataProvider.Verify(m => m.GetMetadataForType(typeof(TestModel)), Times.Once());
128{ new List<TestModel>(), typeof(List<TestModel>) },
138var viewData = new TestViewDataDictionary(new EmptyModelMetadataProvider(), typeof(TestModel));
144$"ViewDataDictionary instance requires a model item of type '{ typeof(TestModel) }'.",
152var model = new List<TestModel>()
189var model = new TestModel();
192ModelExplorer = metadataProvider.GetModelExplorerForType(typeof(TestModel), model),
207Assert.Equal(typeof(TestModel), viewData.ModelMetadata.ModelType);