public void TestMethod3(int i, int j, int sum) { var input = new int[] { 1, 4, -6 }; RangeSumQuery_Immutable = new RangeSumQuery_Immutable(input); Assert.AreEqual(sum, RangeSumQuery_Immutable.SumRange(i, j)); }
public void TestMethod1(int i, int j, int sum) { var input = new int[] { -2, 0, 3, -5, 2, -1 }; RangeSumQuery_Immutable = new RangeSumQuery_Immutable(input); Assert.AreEqual(sum, RangeSumQuery_Immutable.SumRange(i, j)); }
public void TestMethod2() { var input = new int[] { -1 }; RangeSumQuery_Immutable = new RangeSumQuery_Immutable(input); var expected = -1; var actual = RangeSumQuery_Immutable.SumRange(0, 0); Assert.AreEqual(expected, actual); }