aspnetcore/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding
N. Taylor Mullen fc2019c973 Modify `TypeConverterModelBinder`'s `ModelBindingResult.IsModelSet` to be false when model value is `null` for non-null accepting types.
- Previously `ModelBindingResult.IsModelSet` would be set to true if type conversions resulted in empty => `null` values for ValueTypes. This resulted in improper usage of `ModelBindingResult`s creating null ref exceptions in certain cases.
- Updated existing functional test to account for new behavior. Previously it was handling the null ref exception by stating that errors were simply invalid; now we can provide a more distinct error.
- Added unit test to validate `TypeConverterModelBinder` does what it's supposed to when conversions result in null values.
- Added additional integration tests for `TypeConverterModelBinder`.

#2720
2015-07-02 20:03:32 -07:00
..
Metadata Go one less step when resolving `[ModelMetadataType]` 2015-06-14 18:02:10 -07:00
Validation Fixing tests in Mono. 2015-07-02 17:24:14 -07:00
ArrayModelBinderTest.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
BinderTypeBasedModelBinderModelBinderTest.cs Correct test expectations 2015-06-01 12:15:39 -07:00
BindingSourceModelBinderTest.cs Correct test expectations 2015-06-01 12:15:39 -07:00
BindingSourceValueProviderTest.cs
BodyModelBinderTests.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
ByteArrayModelBinderTests.cs Fixing tests in Mono. 2015-07-02 17:24:14 -07:00
CancellationTokenModelBinderTests.cs Correct test expectations 2015-06-01 12:15:39 -07:00
CollectionModelBinderTest.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
ComplexModelDtoTest.cs
CompositeModelBinderTest.cs Correct test expectations 2015-06-01 12:15:39 -07:00
CompositeValueProviderTests.cs
DictionaryBasedValueProviderTests.cs
DictionaryModelBinderTest.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
ElementalValueProviderTests.cs
FormCollectionModelBinderTest.cs
FormFileModelBinderTest.cs
FormValueProviderFactoryTests.cs Correct test expectations 2015-06-01 12:15:39 -07:00
HeaderModelBinderTests.cs Correct test expectations 2015-06-01 12:15:39 -07:00
KeyValuePairModelBinderTest.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
ModelBindingContextTest.cs
ModelBindingResultTest.cs
MutableObjectModelBinderTest.cs Add `ModelBindingContext.IsFirstChanceBinding` and `IsTopLevelObject` 2015-06-24 09:17:29 -07:00
QueryStringValueProviderFactoryTest.cs
ReadableStringCollectionValueProviderTest.cs
SimpleHttpValueProvider.cs
TestValueProvider.cs
TypeConverterModelBinderTest.cs Modify `TypeConverterModelBinder`'s `ModelBindingResult.IsModelSet` to be false when model value is `null` for non-null accepting types. 2015-07-02 20:03:32 -07:00
TypeMatchModelBinderTest.cs Correct test expectations 2015-06-01 12:15:39 -07:00