feat: add logic for testing game possibility and summing possible games

This commit is contained in:
Stevan Freeborn
2023-12-02 11:05:34 -06:00
parent dc8bd473b9
commit 9059ea7b9f
6 changed files with 262 additions and 61 deletions
+23
View File
@@ -0,0 +1,23 @@
namespace CubeConundrum.Tests;
public class ResultTests
{
[Fact]
public void CountProperties_GivenAResult_ItShouldReturnTheCorrectCount()
{
var result = new Result
{
Cubes =
{
new() { Count = 4, Color = CubeColor.Red },
new() { Count = 1, Color = CubeColor.Green },
new() { Count = 2, Color = CubeColor.Blue }
}
};
result.TotalCubeCount.Should().Be(7);
result.RedCubeCount.Should().Be(4);
result.GreenCubeCount.Should().Be(1);
result.BlueCubeCount.Should().Be(2);
}
}