예제 #1
0
 public void Given_InvalidArray_Expect_ThrowsArgumentException(int[] i)
 {
     Assert.Throws <ArgumentException>(() => Subarray.FindLargestSumOfContiguousSubarray(i));
 }
예제 #2
0
        public void Given_ArrayWithPositiveValues_Expect_NumberInArrayWithSmallestMagnitude(int[] i, int e)
        {
            int a = Subarray.FindLargestSumOfContiguousSubarray(i);

            Assert.True(a == e, "Actual: " + a);
        }
예제 #3
0
        public void Given_ValidArray_Expect_LargestSum(int[] i, int e)
        {
            int a = Subarray.FindLargestSumOfContiguousSubarray(i);

            Assert.True(a == e, "Actual: " + a);
        }