public static void InsertAt_Invalid_Throws()
{
using (SecureString testString = CreateSecureString("bd"))
{
Assert.Throws<ArgumentOutOfRangeException>("index", () => testString.InsertAt(-1, 'S'));
Assert.Throws<ArgumentOutOfRangeException>("index", () => testString.InsertAt(6, 'S'));
}
using (SecureString testString = CreateSecureString(CreateString(ushort.MaxValue + 1)))
{
Assert.Throws<ArgumentOutOfRangeException>("capacity", () => testString.InsertAt(22, 'S'));
}
}