public static void InsertAt_LongString()
{
string initialValue = CreateString(ushort.MaxValue);
for (int iter = 0; iter < 2; iter++)
{
using (SecureString testString = CreateSecureString(initialValue))
{
string expected = initialValue;
AssertEquals(expected, testString);
if (iter == 0) // add at the beginning
{
expected = 'b' + expected;
testString.InsertAt(0, 'b');
}
else // add at the end
{
expected += 'b';
testString.InsertAt(testString.Length, 'b');
}
AssertEquals(expected, testString);
}
}
}