public void TestSumArrayDifLength() { My_Array a = new My_Array(new int[] { 1, 2, 3 }); a.Sum(new int[] { 1, 2 }); Assert.Fail(); }
public void TestSumNullArray() { My_Array a = null; a.Sum(new int[] { 1, 2, 3 }); Assert.Fail(); }
public void TestSumArraySameLength() { My_Array a = new My_Array(new int[] { 1, 2, 3 }); a.Sum(new int[] { 1, 2, 3 }); CollectionAssert.AreEqual(a.A, new int[] { 2, 4, 6 }); }
public void Array_Sum_123_123_246() { My_Array a = new My_Array(new int[] { 1, 2, 3 }); a.Sum(new int[] { 1, 2, 3 }); CollectionAssert.AreEqual(a.A, new int[] { 2, 4, 6 }); }
public void Array_Sum_ShorterLength() { My_Array a = new My_Array(new int[] { 1, 2, 3 }); a.Sum(new int[] { 1, 2 }); Assert.Fail(); }
public void CreateFromAnotherArray_FullCopy() { int[] x = new int[] { 1, 2, 3 }; My_Array a = new My_Array(x); My_Array b = new My_Array(a); a.Sum(x); CollectionAssert.AreEqual(a.A, x); Assert.Fail(); }