Bring tests from fa710e6 (rel/1.0.3) into dev

- relates to #5595 which was a 1.0.x-only problem
This commit is contained in:
Doug Bunting 2017-02-10 11:03:13 -08:00
parent 4bddb5ff1b
commit a5c7a7e491
1 changed files with 15 additions and 0 deletions

View File

@ -22,6 +22,9 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
var Model = new TestModel();
var key = "TestModel";
var myModels = new List<TestModel>();
var models = new List<TestModel>();
var modelTest = new TestModel();
var modelType = typeof(TestModel);
return new TheoryData<Expression, string>
{
@ -57,6 +60,18 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
(Expression<Func<TestModel, TestModel>>)(m => Model),
string.Empty
},
{
(Expression<Func<TestModel, int>>)(model => models[0].SelectedCategory.CategoryId),
"models[0].SelectedCategory.CategoryId"
},
{
(Expression<Func<TestModel, string>>)(model => modelTest.Name),
"modelTest.Name"
},
{
(Expression<Func<TestModel, Type>>)(model => modelType),
"modelType"
},
{
(Expression<Func<IList<TestModel>, Category>>)(model => model[2].SelectedCategory),
"[2].SelectedCategory"