public void TestCopyTo_Copies() { StringAdapter list = new StringAdapter("Hello"); char[] output = new char[list.Count]; list.CopyTo(output, 0); Assert.AreEqual("Hello", new String(output), "The values were not copied."); }
public void TestCopyTo_Copies_StartingAtArrayIndex() { StringAdapter list = new StringAdapter("Hello"); char[] output = new char[list.Count + 2]; output[0] = 'a'; output[1] = 'a'; list.CopyTo(output, 2); Assert.AreEqual("aaHello", new String(output), "The values were not copied."); }