Skip to content

Commit d8d61c3

Browse files
Chris Martinezcommonsensesoftware
authored andcommitted
Fix broken test
1 parent fd7ae2a commit d8d61c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/Microsoft.AspNetCore.Mvc.Versioning.Tests/Versioning/ApiVersionModelBinderTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.AspNetCore.Http;
55
using Microsoft.AspNetCore.Http.Features;
66
using Microsoft.AspNetCore.Mvc.ModelBinding;
7+
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
78
using Moq;
89
using System.Threading.Tasks;
910
using Xunit;
@@ -60,6 +61,7 @@ static ModelBindingContext NewModelBindingContext( ApiVersion apiVersion )
6061

6162
bindingContext.SetupGet( bc => bc.HttpContext ).Returns( httpContext );
6263
bindingContext.SetupProperty( bc => bc.Result );
64+
bindingContext.SetupProperty( bc => bc.ValidationState, new ValidationStateDictionary() );
6365

6466
return bindingContext.Object;
6567
}

0 commit comments

Comments
 (0)