System.Security.Tests.SecureStringTests.SetAt_Invalid_Throws C# (CSharp) Méthode

SetAt_Invalid_Throws() private méthode

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