Skip to content

Commit

Permalink
Add IsBelowLimit test to QualityExtensionsTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
KsiProgramming committed May 20, 2024
1 parent d61009e commit c54bf2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Core.Tests/GildedRoseKata.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
Expand All @@ -29,4 +30,8 @@
<Folder Include="ProposedCode\MaturingStrategies\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Core\GildedRoseKata.Core.csproj" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions tests/Core.Tests/ProposedCode/Domain/QualityExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@

namespace GildedRoseKata.ProposedCode.Tests
{
using FluentAssertions;

public class QualityExtensionsTests
{
[Theory]
[InlineData(20, 50, true)]
[InlineData(50, 50, false)]
[InlineData(60, 50, false)]
public void IsBelowLimit(int qualityValue, int limit, bool expectedResult)
{
var quality = new Quality(qualityValue);

var result = quality.IsBelowLimit(limit);

result.Should().Be(expectedResult);
}
}
}

0 comments on commit c54bf2f

Please sign in to comment.