System.Security.Tests.SecureStringTests.SetAt_Invalid_Throws C# (CSharp) Method

SetAt_Invalid_Throws() private method

private SetAt_Invalid_Throws ( ) : void
return void
        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'));
            }
        }