public void ShiftArrayTestMinimal() { var list = new long[] { 1, 2 }; var r = LeaguePlanner.ShiftArrayRight(list, 4); Assert.AreEqual(list[0], 1); Assert.AreEqual(list[1], 4); Assert.AreEqual(r, 2); }
public void ShiftArrayTest() { var list1 = new long[] { 1, 2, 3, 4, 5, 6, 7 }; var r = LeaguePlanner.ShiftArrayRight(list1, 14); Assert.AreEqual(list1[0], 1); Assert.AreEqual(list1[1], 14); Assert.AreEqual(list1[6], 6); Assert.AreEqual(r, 7); var list2 = new long[] { 14, 13, 12, 11, 10, 9, 8 }; r = LeaguePlanner.ShiftArrayLeft(list2, r); Assert.AreEqual(list2[0], 13); Assert.AreEqual(list2[1], 12); Assert.AreEqual(list2[6], 7); Assert.AreEqual(r, 14); }