Skip to content

Commit

Permalink
Enable tests for net6
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremySkinner committed May 26, 2022
1 parent cc27fab commit 587931e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/FluentValidation.Tests/FluentValidation.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<AssemblyName>FluentValidation.Tests</AssemblyName>
<RootNamespace>FluentValidation.Tests</RootNamespace>
<IsPackable>false</IsPackable>
Expand Down
6 changes: 0 additions & 6 deletions src/FluentValidation.Tests/StringEnumValidatorTests.cs
Expand Up @@ -94,13 +94,7 @@ public class StringEnumValidatorTests {
[Fact]
public void When_enumType_is_not_an_enum_it_should_throw() {
var exception = Assert.Throws<ArgumentOutOfRangeException>(() => new TestValidator { v => v.RuleFor(x => x.GenderString).IsEnumName(typeof(Person)) });

#if NETCOREAPP3_1 || NET5_0
string expectedMessage = "The type 'Person' is not an enum and can't be used with IsEnumName. (Parameter 'enumType')";
#else
string expectedMessage = "The type 'Person' is not an enum and can't be used with IsEnumName." + Environment.NewLine + "Parameter name: enumType";
#endif

exception.Message.ShouldEqual(expectedMessage);
}
}
Expand Down

0 comments on commit 587931e

Please sign in to comment.