From d850f300dacd9aff82cfcd711b9ec9144fe610ba Mon Sep 17 00:00:00 2001 From: PTKu <61538034+PTKu@users.noreply.github.com> Date: Thu, 28 Nov 2024 07:06:41 +0100 Subject: [PATCH] Update tests and scripts for .NET 9.0 compatibility Modified OnlinerBaseTypeTests.cs to use Is.InstanceOf for more accurate type checking in GetParentTest. Updated test_L10.ps1 and test_L2.ps1 scripts to run with --framework net9.0 and exit with $LASTEXITCODE for improved build and test processes. --- .../ValueTypes/OnlinerBaseTypeTests.cs | 2 +- test_L10.ps1 | 2 +- test_L2.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs index c3a409fd..6e73b156 100644 --- a/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs +++ b/src/AXSharp.connectors/tests/AXSharp.ConnectorLegacyTests/ValueTypes/OnlinerBaseTypeTests.cs @@ -68,7 +68,7 @@ public void GetSymbolTailTest() [Test()] public void GetParentTest() { - Assert.That(Onliner.GetParent(), Is.EqualTo(typeof(ITwinObject))); + Assert.That(Onliner.GetParent(), Is.InstanceOf(typeof(ITwinObject))); } diff --git a/test_L10.ps1 b/test_L10.ps1 index ab64f11a..891be513 100644 --- a/test_L10.ps1 +++ b/test_L10.ps1 @@ -1,4 +1,4 @@ # run build -dotnet run --project cake/Build.csproj --do-test --test-level 10 +dotnet run --project cake/Build.csproj --do-test --test-level 10 --framework net9.0 exit $LASTEXITCODE; \ No newline at end of file diff --git a/test_L2.ps1 b/test_L2.ps1 index ec66dbc7..3d16e17b 100644 --- a/test_L2.ps1 +++ b/test_L2.ps1 @@ -1,4 +1,4 @@ # run build -dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2 +dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2 --framework net9.0 exit $LASTEXITCODE; \ No newline at end of file