public static void SetAt_Invalid_Throws()
{
using (SecureString testString = CreateSecureString("test"))
{
Assert.Throws<ArgumentOutOfRangeException>("index", () => testString.SetAt(-1, 'a'));
Assert.Throws<ArgumentOutOfRangeException>("index", () => testString.SetAt(testString.Length, 'b'));
Assert.Throws<ArgumentOutOfRangeException>("index", () => testString.SetAt(testString.Length + 1, 'c'));
}
}