Skip to content

Commit

Permalink
Optional: Add new xUnit tests stub
Browse files Browse the repository at this point in the history
  • Loading branch information
andreise committed Feb 14, 2024
1 parent 3d2d922 commit 266a380
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/core-taggeds-optional/Optional.Tests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
32 changes: 32 additions & 0 deletions src/core-taggeds-optional/Optional.Tests/Optional.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Authors>Andrei Sergeev, Pavel Moskovoy</Authors>
<Copyright>Copyright © 2020-2024 Andrei Sergeev, Pavel Moskovoy</Copyright>
<RootNamespace>PrimeFuncPack.Core.Tests</RootNamespace>
<AssemblyName>PrimeFuncPack.Core.Optional.Tests</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Optional\Optional.csproj" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions src/core-taggeds-optional/Optional.Tests/TestStub.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace PrimeFuncPack.Core.Tests;

public static class TestStub
{
[Fact]
public static void TestTrue()
{
Assert.True(true);
}
}

0 comments on commit 266a380

Please sign in to comment.