diff --git a/Tests/NetCore20.Specs/NetCore20.Specs.csproj b/Tests/NetCore20.Specs/NetCore20.Specs.csproj index 4bf166e29e..7044469e2e 100644 --- a/Tests/NetCore20.Specs/NetCore20.Specs.csproj +++ b/Tests/NetCore20.Specs/NetCore20.Specs.csproj @@ -7,7 +7,9 @@ 7.2 - + + NU1701 + diff --git a/Tests/Shared.Specs/BasicEquivalencySpecs.cs b/Tests/Shared.Specs/BasicEquivalencySpecs.cs index a9661a62e3..8b9320a83e 100644 --- a/Tests/Shared.Specs/BasicEquivalencySpecs.cs +++ b/Tests/Shared.Specs/BasicEquivalencySpecs.cs @@ -2789,13 +2789,12 @@ public void When_not_all_the_properties_of_the_nested_objects_are_equal_it_shoul //----------------------------------------------------------------------------------------------------------- // Assert //----------------------------------------------------------------------------------------------------------- - act - .Should().Throw().Which.Message + act.Should().Throw().Which.Message // Checking exception message exactly is against general guidelines // but in that case it was done on purpose, so that we have at least single // test confirming that whole mechanism of gathering description from // equivalency steps works. - .Should().Be("Expected member Level.Text to be \"Level2\", but \"Level1\" differs near \"1\" (index 5).\r\n\nWith configuration:\n- Use declared types and members\r\n- Compare enums by value\r\n- Match member by name (or throw)\r\n- Without automatic conversion.\r\n- Be strict about the order of items in byte arrays\r\n"); + .Should().MatchRegex(@"^Expected member Level\.Text to be ""Level2"", but ""Level1"" differs near ""1"" \(index 5\)\.[\r\n]+With configuration:[\r\n]+\- Use declared types and members[\r\n]+\- Compare enums by value[\r\n]+\- Match member by name \(or throw\)[\r\n]+\- Without automatic conversion\.[\r\n]+\- Be strict about the order of items in byte arrays[\r\n]+$"); } [Fact]