public void TestThirdCase() { int[] arr = new int[] { 7, 6, 4, 3, 1 }; var prof = new MaxProfit1(arr); var result = prof.GetMaxProfit(); Assert.AreEqual(0, result); }
public void TestFirstCase() { int[] arr = null; var prof = new MaxProfit1(arr); var result = prof.GetMaxProfit(); Assert.AreEqual(0, result); }
public void TestSecondCase() { int[] arr = new int[] { 7, 1, 5, 3, 6, 4 }; var prof = new MaxProfit1(arr); var result = prof.GetMaxProfit(); Assert.AreEqual(5, result); }