Skip to content

Commit

Permalink
feat: include Result Helper for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Feb 1, 2025
1 parent 833292e commit 5edc010
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
18 changes: 18 additions & 0 deletions template/UnitTest/Initializer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using CarboxylicLithiumTestHelper;
using FluentAssertions;
using FluentAssertions.Extensibility;
using UnitTest;

[assembly: AssertionEngineInitializer(typeof(Initializer), nameof(Initializer.Initialize))]

namespace UnitTest;

public static class Initializer
{
public static void Initialize()
{
AssertionConfiguration.Current.Equivalency.Modify(o =>
o.Using(new ResultEquivalencyStep())
);
}
}
17 changes: 12 additions & 5 deletions template/UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="FluentAssertions" Version="8.0.0-rc.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="AtomiCloud.Result.TestHelper" Version="1.2.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="8.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 5edc010

Please sign in to comment.