feat: start working on part 1 solution

This commit is contained in:
Stevan Freeborn
2023-12-09 12:17:56 -06:00
parent 3bd6ced4b7
commit 86fda4a81f
4 changed files with 182 additions and 12 deletions
@@ -0,0 +1,35 @@
namespace MirageMaintenance.Tests;
public class UnitTest1
{
[Theory]
[MemberData(nameof(TestData.OasisReportParseTestData), MemberType = typeof(TestData))]
public void Parse_GivenAReportInput_ItShouldReturnExpectedOasisReportInstance(string[] input, OasisReport expected)
{
OasisReport.Parse(input).Should().BeEquivalentTo(expected);
}
public static class TestData
{
public static IEnumerable<object[]> OasisReportParseTestData =>
new List<object[]>
{
new object[]
{
new string[]
{
"0 3 6 9 12 15",
"1 3 6 10 15 21",
"10 13 16 21 30 45",
},
new OasisReport(
[
new([0, 3, 6, 9, 12, 15]),
new([1, 3, 6, 10, 15, 21]),
new([10, 13, 16, 21, 30, 45]),
]
)
}
};
}
}