From 478a2060ba87857dbd9525e5893fe1ce17553e08 Mon Sep 17 00:00:00 2001 From: Peter Butzhammer Date: Thu, 25 Apr 2024 10:23:51 +0200 Subject: [PATCH] Fix or ignore build warnings in tests --- Sharp7.Rx.Tests/Sharp7.Rx.Tests.csproj | 6 ++++++ Sharp7.Rx.Tests/VariableNameParserTests.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Sharp7.Rx.Tests/Sharp7.Rx.Tests.csproj b/Sharp7.Rx.Tests/Sharp7.Rx.Tests.csproj index d1de65b..2c16b68 100644 --- a/Sharp7.Rx.Tests/Sharp7.Rx.Tests.csproj +++ b/Sharp7.Rx.Tests/Sharp7.Rx.Tests.csproj @@ -6,6 +6,12 @@ enable enable latest-Recommended + + + $(NoWarn);CA1859;CA1852 diff --git a/Sharp7.Rx.Tests/VariableNameParserTests.cs b/Sharp7.Rx.Tests/VariableNameParserTests.cs index 4ecf1c5..c3e0405 100644 --- a/Sharp7.Rx.Tests/VariableNameParserTests.cs +++ b/Sharp7.Rx.Tests/VariableNameParserTests.cs @@ -42,7 +42,7 @@ internal class VariableNameParserTests public void Invalid(string? input) { var parser = new VariableNameParser(); - Should.Throw(() => parser.Parse(input)); + Should.Throw(() => parser.Parse(input!)); } public static IEnumerable ValidTestCases()