public void Should_Pass_Cases(int[] input, int[] expected)
        {
            // Arrange
            var obj = new MaxNonNegativeSubArray();

            // Act
            var actual = obj.maxset(input.ToList());

            // Assert
            actual.Should().BeEquivalentTo(expected.ToList());
        }
Exemple #2
0
        public void Test2()
        {
            var problem = new MaxNonNegativeSubArray();
            var input   = new List <int> {
                10, -1, 2, 3, -4, 100
            };
            var expectedOutput = new List <int> {
                100
            };
            var output = problem.Solve(input);

            CollectionAssert.AreEqual(expectedOutput, output);
        }