Fix or ignore build warnings in tests

This commit is contained in:
Peter Butzhammer
2024-04-25 10:23:51 +02:00
parent 87d69fb614
commit 478a2060ba
2 changed files with 7 additions and 1 deletions

View File

@@ -6,6 +6,12 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-Recommended</AnalysisLevel>
<!--
CA1859: Change type of field 'xxx' from interface to type for performance reasons
CA1852: Type 'ReadFromBuffer' can be sealed
-->
<NoWarn>$(NoWarn);CA1859;CA1852</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@@ -42,7 +42,7 @@ internal class VariableNameParserTests
public void Invalid(string? input)
{
var parser = new VariableNameParser();
Should.Throw<InvalidS7AddressException>(() => parser.Parse(input));
Should.Throw<InvalidS7AddressException>(() => parser.Parse(input!));
}
public static IEnumerable<TestCase> ValidTestCases()