Skip to content

Commit 1c01f7b

Browse files
authored
Install NUnit.Analyzers package (#643)
+semver:patch
1 parent 528ff4c commit 1c01f7b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ insert_final_newline = true
1818
csharp_style_namespace_declarations = file_scoped
1919

2020
dotnet_diagnostic.ide0161.severity = warning
21+
dotnet_diagnostic.NUnit1032.severity = suggestion
2122

2223
# ReSharper properties
2324
resharper_default_private_modifier = implicit

src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
2323
<PackageReference Include="FakeItEasy" Version="8.1.0" />
2424
<PackageReference Include="NUnit" Version="3.14.0" />
25+
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
26+
<PrivateAssets>all</PrivateAssets>
27+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28+
</PackageReference>
2529
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
2630
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
2731
</ItemGroup>

src/FluentNHibernate.Testing/Testing/XmlWriterTestHelper.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ internal void Check(XmlDocument document)
9999
document.OutputXmlToConsole();
100100

101101
Assert.That(areEqual,
102-
"Property '{0}' was set to '{1}' and was expected to be written to attribute '{2}' with value '{3}'. The value was instead '{4}'",
103-
sourceProperty.InnerMember.MemberInfo.ReflectedType.Name + "." + sourceProperty.Name,
104-
sourceValue, check.Key, check.Value, attributeValue
105-
);
102+
$"Property '{sourceProperty.InnerMember.MemberInfo.ReflectedType?.Name}.{sourceProperty.Name}' was set to '{sourceValue}' " +
103+
$"and was expected to be written to attribute '{check.Key}' with value '{check.Value}'. " +
104+
$"The value was instead '{attributeValue}'");
106105
//string.Equals()
107106
//rootElement.AttributeShouldEqual(check.Key, check.Value.ToString());
108107
//rootElement.Attributes[check.Key].Value.ShouldBeEqualIgnoringCase(check.Value.ToString());

0 commit comments

Comments
 (0)