67 references to CreateModelMetadata
Microsoft.AspNetCore.Mvc.Core.Test (67)
ModelBinding\Metadata\DefaultModelMetadataTest.cs (67)
994var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false);
1012var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false);
1028var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false);
1042var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: true);
1056var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: null);
1072var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1097var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1100var property1Metadata = CreateModelMetadata(property1Identity, metadataProvider.Object, hasValidators: false);
1103var property2Metadata = CreateModelMetadata(property2Identity, metadataProvider.Object, hasValidators: true);
1124var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1127var propertyMetadata = CreateModelMetadata(propertyIdentity, metadataProvider.Object, hasValidators: null);
1148var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1151var property1Metadata = CreateModelMetadata(property1Identity, metadataProvider.Object, hasValidators: false);
1154var property2Metadata = CreateModelMetadata(property2Identity, metadataProvider.Object, hasValidators: false);
1175var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1178var employeeIdMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1180var employeeUnitMetadata = CreateModelMetadata(employeeUnit, metadataProvider.Object, hasValidators: false);
1182var employeeManagerMetadata = CreateModelMetadata(employeeManager, metadataProvider.Object, hasValidators: false);
1184var employeeEmployeesMetadata = CreateModelMetadata(employeeEmployees, metadataProvider.Object, hasValidators: false);
1188var unitHeadMetadata = CreateModelMetadata(unitHead, metadataProvider.Object, hasValidators: false);
1190var unitIdMetadata = CreateModelMetadata(unitId, metadataProvider.Object, hasValidators: true); // BusinessUnit.Id has validators.
1216var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1219var employeeIdMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1221var employeeUnitMetadata = CreateModelMetadata(employeeUnit, metadataProvider.Object, hasValidators: false);
1223var employeeManagerMetadata = CreateModelMetadata(employeeManager, metadataProvider.Object, hasValidators: false);
1225var employeeEmployeesMetadata = CreateModelMetadata(employeeEmployees, metadataProvider.Object, hasValidators: false);
1229var unitHeadMetadata = CreateModelMetadata(unitHead, metadataProvider.Object, hasValidators: true); // BusinessUnit.Head has validators
1231var unitIdMetadata = CreateModelMetadata(unitId, metadataProvider.Object, hasValidators: false);
1259var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1262var employeeIdMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, false);
1264var employeeEmployeesMetadata = CreateModelMetadata(employeeEmployees, metadataProvider.Object, hasValidators: false);
1272.Returns(CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: true)); // Employees.Employee has validators
1288var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1291var employeeIdMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1293var employeeUnitMetadata = CreateModelMetadata(employeeUnit, metadataProvider.Object, hasValidators: false);
1295var employeeManagerMetadata = CreateModelMetadata(employeeManager, metadataProvider.Object, hasValidators: false);
1297var employeeEmployeesIdMetadata = CreateModelMetadata(employeeEmployeesId, metadataProvider.Object, hasValidators: false);
1301var unitHeadMetadata = CreateModelMetadata(unitHead, metadataProvider.Object, hasValidators: false);
1303var unitIdMetadata = CreateModelMetadata(unitId, metadataProvider.Object, hasValidators: false);
1335var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1339var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: false);
1343var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: false);
1345var constructorMetadata = CreateModelMetadata(
1379var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1383var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: false);
1387var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: true);
1389var constructorMetadata = CreateModelMetadata(ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null);
1424var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1428var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: false);
1432var property2Metadata = CreateModelMetadata(property2Id, metadataProvider.Object, hasValidators: false);
1436var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: false);
1438var constructorMetadata = CreateModelMetadata(
1469var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1473var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: false);
1477var property2Metadata = CreateModelMetadata(property2Id, metadataProvider.Object, hasValidators: false);
1481var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: true);
1483var constructorMetadata = CreateModelMetadata(
1514var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1518var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: false);
1522var property2Metadata = CreateModelMetadata(property2Id, metadataProvider.Object, hasValidators: true);
1526var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: false);
1528var constructorMetadata = CreateModelMetadata(
1559var modelMetadata = CreateModelMetadata(modelIdentity, metadataProvider.Object, hasValidators: false);
1563var propertyMetadata = CreateModelMetadata(propertyId, metadataProvider.Object, hasValidators: true);
1566var property2Metadata = CreateModelMetadata(property2Id, metadataProvider.Object, hasValidators: false);
1569var parameterMetadata = CreateModelMetadata(parameterId, metadataProvider.Object, hasValidators: false);
1571var constructorMetadata = CreateModelMetadata(