diff --git a/test/Microsoft.AspNet.Mvc.IntegrationTests/ByteArrayModelBinderIntegrationTest.cs b/test/Microsoft.AspNet.Mvc.IntegrationTests/ByteArrayModelBinderIntegrationTest.cs index 334002f7b6..08173274df 100644 --- a/test/Microsoft.AspNet.Mvc.IntegrationTests/ByteArrayModelBinderIntegrationTest.cs +++ b/test/Microsoft.AspNet.Mvc.IntegrationTests/ByteArrayModelBinderIntegrationTest.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests public byte[] Token { get; set; } } - [Theory(Skip = "ModelState.Value not set due to #2445, #2447")] + [Theory(Skip = "ModelState.Value not set due to #2445")] [InlineData(true)] [InlineData(false)] public async Task BindProperty_WithData_GetsBound(bool fallBackScenario) @@ -68,12 +68,12 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests var key = Assert.Single(modelState.Keys, k => k == queryStringKey + "[0]"); Assert.NotNull(modelState[key].Value); // should be non null bug #2445. Assert.Empty(modelState[key].Errors); - Assert.Equal(ModelValidationState.Valid, modelState[key].ValidationState); // Should be skipped. bug#2447 + Assert.Equal(ModelValidationState.Valid, modelState[key].ValidationState); key = Assert.Single(modelState.Keys, k => k == queryStringKey + "[1]"); Assert.NotNull(modelState[key].Value); // should be non null bug #2445. Assert.Empty(modelState[key].Errors); - Assert.Equal(ModelValidationState.Valid, modelState[key].ValidationState); // Should be skipped. bug#2447 + Assert.Equal(ModelValidationState.Valid, modelState[key].ValidationState); } [Fact] diff --git a/test/Microsoft.AspNet.Mvc.IntegrationTests/CancellationTokenModelBinderIntegrationTest.cs b/test/Microsoft.AspNet.Mvc.IntegrationTests/CancellationTokenModelBinderIntegrationTest.cs index 461584c786..a074a37966 100644 --- a/test/Microsoft.AspNet.Mvc.IntegrationTests/CancellationTokenModelBinderIntegrationTest.cs +++ b/test/Microsoft.AspNet.Mvc.IntegrationTests/CancellationTokenModelBinderIntegrationTest.cs @@ -19,8 +19,8 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests public CancellationToken Token { get; set; } } - [Fact(Skip = "CancellationToken should not be validated #2447.")] - public async Task BindProperty_WithData__WithPrefix_GetsBound() + [Fact] + public async Task BindProperty_WithData_WithPrefix_GetsBound() { // Arrange var argumentBinder = ModelBindingTestHelper.GetArgumentBinder(); @@ -55,19 +55,11 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests // ModelState Assert.True(modelState.IsValid); - Assert.Equal(2, modelState.Keys.Count); - Assert.Single(modelState.Keys, k => k == "CustomParameter"); - - var key = Assert.Single(modelState.Keys, k => k == "CustomParameter.Token"); - Assert.Null(modelState[key].Value); - Assert.Empty(modelState[key].Errors); - - // This Assert Fails. - Assert.Equal(ModelValidationState.Skipped, modelState[key].ValidationState); + Assert.Equal(0, modelState.Keys.Count); } - [Fact(Skip = "CancellationToken should not be validated #2447")] - public async Task BindProperty_WithData__WithEmptyPrefix_GetsBound() + [Fact] + public async Task BindProperty_WithData_WithEmptyPrefix_GetsBound() { // Arrange var argumentBinder = ModelBindingTestHelper.GetArgumentBinder(); @@ -97,16 +89,10 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests // ModelState Assert.True(modelState.IsValid); - var key = Assert.Single(modelState.Keys); - Assert.Equal("Token", key); - Assert.Null(modelState[key].Value); - Assert.Empty(modelState[key].Errors); - - // This Assert Fails. - Assert.Equal(ModelValidationState.Skipped, modelState[key].ValidationState); + Assert.Equal(0, modelState.Count); } - [Fact(Skip = "CancellationToken should not be validated #2447.")] + [Fact] public async Task BindParameter_WithData_GetsBound() { // Arrange @@ -140,13 +126,7 @@ namespace Microsoft.AspNet.Mvc.IntegrationTests // ModelState Assert.True(modelState.IsValid); - var key = Assert.Single(modelState.Keys); - Assert.Equal("CustomParameter", key); - Assert.Null(modelState[key].Value); - Assert.Empty(modelState[key].Errors); - - // This assert fails. - Assert.Equal(ModelValidationState.Skipped, modelState[key].ValidationState); + Assert.Equal(0, modelState.Count); } } } \ No newline at end of file