public void Given_InvalidArray_Expect_ThrowsArgumentException(int[] i) { Assert.Throws <ArgumentException>(() => Subarray.FindLargestSumOfContiguousSubarray(i)); }
public void Given_ArrayWithPositiveValues_Expect_NumberInArrayWithSmallestMagnitude(int[] i, int e) { int a = Subarray.FindLargestSumOfContiguousSubarray(i); Assert.True(a == e, "Actual: " + a); }
public void Given_ValidArray_Expect_LargestSum(int[] i, int e) { int a = Subarray.FindLargestSumOfContiguousSubarray(i); Assert.True(a == e, "Actual: " + a); }