Exemplo n.º 1
0
 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.");
 }
Exemplo n.º 2
0
 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.");
 }