Skip to content

Commit

Permalink
Install NUnit.Analyzers package (#643)
Browse files Browse the repository at this point in the history
+semver:patch
  • Loading branch information
hazzik authored Feb 26, 2024
1 parent 528ff4c commit 1c01f7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ insert_final_newline = true
csharp_style_namespace_declarations = file_scoped

dotnet_diagnostic.ide0161.severity = warning
dotnet_diagnostic.NUnit1032.severity = suggestion

# ReSharper properties
resharper_default_private_modifier = implicit
Expand Down
4 changes: 4 additions & 0 deletions src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="FakeItEasy" Version="8.1.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
</ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/FluentNHibernate.Testing/Testing/XmlWriterTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ internal void Check(XmlDocument document)
document.OutputXmlToConsole();

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

0 comments on commit 1c01f7b

Please sign in to comment.