From 266a380378b2675b8d44efdb4315d9e194524c1f Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Thu, 15 Feb 2024 00:55:17 +0400 Subject: [PATCH] Optional: Add new xUnit tests stub --- .github/workflows/dotnet.yml | 6 ++++ .../Optional.Tests/GlobalUsings.cs | 1 + .../Optional.Tests/Optional.Tests.csproj | 32 +++++++++++++++++++ .../Optional.Tests/TestStub.cs | 10 ++++++ 4 files changed, 49 insertions(+) create mode 100644 src/core-taggeds-optional/Optional.Tests/GlobalUsings.cs create mode 100644 src/core-taggeds-optional/Optional.Tests/Optional.Tests.csproj create mode 100644 src/core-taggeds-optional/Optional.Tests/TestStub.cs diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4b5b04a7..a31201de 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -62,6 +62,12 @@ jobs: - name: Pack Optional run: dotnet pack ./src/*/*/Optional.csproj --no-restore -o ~/nuget -c Release + - name: Restore Optional.Tests.Old + run: dotnet restore ./src/*/*/Optional.Tests.Old.csproj + + - name: Test Optional.Tests.Old + run: dotnet test ./src/*/*/Optional.Tests.Old.csproj --no-restore -c Release + - name: Restore Optional.Tests run: dotnet restore ./src/*/*/Optional.Tests.csproj diff --git a/src/core-taggeds-optional/Optional.Tests/GlobalUsings.cs b/src/core-taggeds-optional/Optional.Tests/GlobalUsings.cs new file mode 100644 index 00000000..8c927eb7 --- /dev/null +++ b/src/core-taggeds-optional/Optional.Tests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/src/core-taggeds-optional/Optional.Tests/Optional.Tests.csproj b/src/core-taggeds-optional/Optional.Tests/Optional.Tests.csproj new file mode 100644 index 00000000..5f8e73e9 --- /dev/null +++ b/src/core-taggeds-optional/Optional.Tests/Optional.Tests.csproj @@ -0,0 +1,32 @@ + + + + net6.0;net7.0;net8.0 + latest + disable + enable + true + true + false + true + Andrei Sergeev, Pavel Moskovoy + Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy + PrimeFuncPack.Core.Tests + PrimeFuncPack.Core.Optional.Tests + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/src/core-taggeds-optional/Optional.Tests/TestStub.cs b/src/core-taggeds-optional/Optional.Tests/TestStub.cs new file mode 100644 index 00000000..05f82c8d --- /dev/null +++ b/src/core-taggeds-optional/Optional.Tests/TestStub.cs @@ -0,0 +1,10 @@ +namespace PrimeFuncPack.Core.Tests; + +public static class TestStub +{ + [Fact] + public static void TestTrue() + { + Assert.True(true); + } +}