diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-09 16:08:53 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-09 16:08:53 +0700 |
commit | da13ced93565971e2551ab874b6a1804b9e2322a (patch) | |
tree | e2d397c7d58ca6a2eb1aefd9bc9f99374aba0030 /crypto/test/src/openpgp | |
parent | Asn1Generator implements IDisposable (diff) | |
download | BouncyCastle.NET-ed25519-da13ced93565971e2551ab874b6a1804b9e2322a.tar.xz |
Various Close/Dispose cleanup
Diffstat (limited to 'crypto/test/src/openpgp')
-rw-r--r-- | crypto/test/src/openpgp/test/PGPPBETest.cs | 8 | ||||
-rw-r--r-- | crypto/test/src/openpgp/test/PGPRSATest.cs | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/crypto/test/src/openpgp/test/PGPPBETest.cs b/crypto/test/src/openpgp/test/PGPPBETest.cs index 85d6b7bff..8bab78fd9 100644 --- a/crypto/test/src/openpgp/test/PGPPBETest.cs +++ b/crypto/test/src/openpgp/test/PGPPBETest.cs @@ -365,7 +365,13 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests { throw new Exception("Close() called on underlying stream"); } - } + + protected override void Dispose(bool disposing) + { + if (disposing) + throw new Exception("Dispose() called on underlying stream"); + } + } public override string Name { diff --git a/crypto/test/src/openpgp/test/PGPRSATest.cs b/crypto/test/src/openpgp/test/PGPRSATest.cs index d8b350b2d..6de95fbeb 100644 --- a/crypto/test/src/openpgp/test/PGPRSATest.cs +++ b/crypto/test/src/openpgp/test/PGPRSATest.cs @@ -1208,6 +1208,12 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp.Tests { throw new Exception("Close() called on underlying stream"); } + + protected override void Dispose(bool disposing) + { + if (disposing) + throw new Exception("Dispose() called on underlying stream"); + } } public override string Name |