Example #1
0
 public void TwoOperationsTest()
 {
     check = new int[] { -1, 0, 5, 13451, 23, -43252, 555 };
     list  = ListMethods.Map(list, x => x * 2);
     list  = ListMethods.Map(list, x => x / 2);
     AssertAll(list, check);
 }
Example #2
0
 public void ThreeOperationsTest()
 {
     check = new int[] { 0, 0, 0, 0, 0, -0, 0 };
     list  = ListMethods.Map(list, x => x * 2);
     list  = ListMethods.Map(list, x => x / 2);
     list  = ListMethods.Map(list, x => x * 0);
     AssertAll(list, check);
 }
Example #3
0
 public void SubtractionOneTest()
 {
     check = new int[] { -2, -1, 4, 13450, 22, -43253, 554 };
     list  = ListMethods.Map(list, x => x - 1);
     AssertAll(list, check);
 }
Example #4
0
 public void AdditionZeroTest()
 {
     check = new int[] { -1, 0, 5, 13451, 23, -43252, 555 };
     list  = ListMethods.Map(list, x => x + 0);
     AssertAll(list, check);
 }
Example #5
0
 public void MulitToNegativeTest()
 {
     check = new int[] { 1, 0, -5, -13451, -23, 43252, -555 };
     list  = ListMethods.Map(list, x => x *= -1);
     AssertAll(list, check);
 }
Example #6
0
 public void MultToZeroTest()
 {
     check = new int[] { 0, 0, 0, 0, 0, 0, 0 };
     list  = ListMethods.Map(list, x => x * 0);
     AssertAll(list, check);
 }
Example #7
0
 public void MultTo2Test()
 {
     check = new int[] { -2, 0, 10, 26902, 46, -86504, 1110 };
     list  = ListMethods.Map(list, x => x * 2);
     AssertAll(list, check);
 }