aspnetcore/test/Microsoft.AspNetCore.Mvc.Co.../ModelBinding
Doug Bunting d3c24637b1 Correct `Type.IsAssignableFrom()` polarity
- #3482
 - see new tests; many failed without fixes in the product code
 - add support for binding `IFormFileCollection` properties
 - make `FormFileModelBinder` / `HeaderModelBinder` collection handling consistent w/ `GenericModelBinder`++
  - see also dupe bug #4129 which describes some of the prior inconsistencies
  - add checks around creating collections and leaving non-top-level collections `null` (not empty)
 - move smarts down to `ModelBindingHelper.GetCompatibleCollection<T>()` (was `ConvertValuesToCollectionType<T>()`)
  - add `ModelBindingHelper.CanGetCompatibleCollection()`
  - add fallback for cases like `public IEnumerable<T> Property { get; set; } = new T[0];`
- #4193
 - allow `Exception`s while activating collections to propagate
- part of #4181
 - `CollectionModelBinder` no longer creates an instance to check if it can create an instance
 - not a complete fix since it still creates unnecessary intermediate lists

nits:
- correct a few existing test names since nothing is not the same as `ModelBindingResult.Failed()`
- remove a couple of unnecessary `return` statements
- correct stale "optimized" comments
- explicit `(string)`
2016-03-03 09:55:01 -08:00
..
Metadata [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
Validation [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
ArrayModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
BinderTypeBasedModelBinderModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
BindingSourceValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
BodyModelBinderTests.cs [Fixes 3961] Consider InputFormatter behavior when we can't read the charset 2016-02-05 10:42:36 -08:00
ByteArrayModelBinderTests.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
CancellationTokenModelBinderTests.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
CollectionModelBinderTest.cs Correct `Type.IsAssignableFrom()` polarity 2016-03-03 09:55:01 -08:00
CompositeModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
CompositeValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
DefaultModelBindingContextTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
DictionaryModelBinderTest.cs Correct `Type.IsAssignableFrom()` polarity 2016-03-03 09:55:01 -08:00
EnumerableValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
FormCollectionModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
FormFileModelBinderTest.cs Correct `Type.IsAssignableFrom()` polarity 2016-03-03 09:55:01 -08:00
FormValueProviderFactoryTest.cs [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
FormValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
HeaderModelBinderTests.cs Correct `Type.IsAssignableFrom()` polarity 2016-03-03 09:55:01 -08:00
JQueryFormValueProviderFactoryTest.cs [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
JQueryFormValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
KeyValuePairModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
ModelBindingHelperTest.cs Correct `Type.IsAssignableFrom()` polarity 2016-03-03 09:55:01 -08:00
ModelBindingResultTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
MutableObjectModelBinderTest.cs Rewrite MutableObjectModelBinder 2016-02-10 09:48:05 -08:00
QueryStringValueProviderFactoryTest.cs [Fixes #3904] Redesigned IValueProviderFactory and renamed a few methods 2016-02-03 11:31:05 -08:00
QueryStringValueProviderTest.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
RouteValueProviderTests.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
ServicesModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
SimpleTypeModelBinderTest.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
SimpleValueProvider.cs Fix behavior of StartsWithPrefix 2016-02-17 11:16:16 -08:00
StubModelBinder.cs Reducing ModelBindingContext allocations 2016-02-02 12:10:43 -08:00
TestValueProvider.cs Rename AspNet 5 file contents. 2016-01-22 12:18:33 -08:00
UnsupportedContentTypeFilterTest.cs Moved missing file from AspNetCore rename 2016-01-29 16:32:30 -08:00