public void ShouldReturnEmptyResultWhenNoValidPathPresent()
        {
            var input = new int[]
            {
                1,
                1, 1,
                1, 1, 1,
                1, 1, 1, 1
            };

            var result = _sut.Calculate(input);

            var expectedResult = new TriangleMaxSumPathResult();

            AssertResultMatchesExpected(result, expectedResult);
        }
        public void ShouldCalculateCorrectResultForSampleCase4()
        {
            var input = new int[]
            {
                1,
                2, 4,
            };

            var result = _sut.Calculate(input);

            var expectedResult = new TriangleMaxSumPathResult
                                 (
                maxSum: 5,
                path: new[] { 1, 4 }
                                 );

            AssertResultMatchesExpected(result, expectedResult);
        }
 private void AssertResultMatchesExpected(TriangleMaxSumPathResult result,
                                          TriangleMaxSumPathResult expectedResult)
 {
     result.MaxSum.Should().Be(expectedResult.MaxSum);
     result.Path.Should().BeEquivalentTo(expectedResult.Path, opt => opt.WithStrictOrdering());
 }