public void CopiedArray_OnCopyToWithZeroOffset() { using var lohLessList = new LOHLessCollection <int>(); foreach (int i in Enumerable.Range(1, 48)) { lohLessList.Add(i); } int[] destinationArray = new int[48]; lohLessList.CopyTo(destinationArray, 0); Assert.AreEqual(48, destinationArray[47]); }
public void CopiedArray_OnCopyToWithNoneZeroOffset() { var temp = new List <int>(48); using var lohLessList = new LOHLessCollection <int>(); foreach (int i in Enumerable.Range(1, 48)) { lohLessList.Add(i); temp.Add(i); } int[] destinationArray1 = new int[58]; temp.CopyTo(destinationArray1, 10); int[] destinationArray2 = new int[58]; lohLessList.CopyTo(destinationArray2, 10); for (int i = 0; i < 58; i++) { Assert.AreEqual(destinationArray1[i], destinationArray2[i]); } }