byte[] crypt = Encrypt(rsa, TestData.HelloBytes, RSAEncryptionPadding.OaepSHA1);
// Export the key, this should not clear/destroy the key.
- RSAParameters ignored = rsa.ExportParameters(true);
+ rsa.ExportParameters(true);
output = Decrypt(rsa, crypt, RSAEncryptionPadding.OaepSHA1);
}
count = rawAcl.Count;
//test remove at -1
- Assert.Throws<ArgumentOutOfRangeException>(() =>
- {
- index = -1;
- rawAcl.RemoveAce(index);
- });
+ AssertExtensions.Throws<ArgumentOutOfRangeException>(
+ "index",
+ () =>
+ {
+ index = -1;
+ rawAcl.RemoveAce(index);
+ });
+
+ //test remove at value too large
+ AssertExtensions.Throws<ArgumentOutOfRangeException>(
+ "index",
+ () =>
+ {
+ index = int.MaxValue;
+ rawAcl.RemoveAce(index);
+ });
//test remove at 0, only need to catch ArgumentOutOfRangeException if Count = 0
index = 0;