public void VerifyWrittenString()
{
char[] chArr = setupArray();
// [] Write string with wide selection of characters and read it back
StringBuilder sb = new StringBuilder(40);
Stream ms = CreateStream();
StreamWriter sw = new StreamWriter(ms);
StreamReader sr;
for (int i = 0; i < chArr.Length; i++)
sb.Append(chArr[i]);
sw.Write(sb.ToString());
sw.Flush();
ms.Position = 0;
sr = new StreamReader(ms);
for (int i = 0; i < chArr.Length; i++)
{
Assert.Equal((int)chArr[i], sr.Read());
}
}