summary refs log tree commit diff
path: root/crypto/test/src/util
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 15:07:29 +0700
commitb72579c4b1200459f959bcd6a25364e239420573 (patch)
tree5e566cc2b7972cd8ccebece92d879bddc800393d /crypto/test/src/util
parentRemove certpath from PkixCertPathValidatorException (diff)
downloadBouncyCastle.NET-ed25519-b72579c4b1200459f959bcd6a25364e239420573.tar.xz
Cleanup Exception classes
Diffstat (limited to 'crypto/test/src/util')
-rw-r--r--crypto/test/src/util/test/SimpleTest.cs2
-rw-r--r--crypto/test/src/util/test/TestFailedException.cs15
2 files changed, 7 insertions, 10 deletions
diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs
index fc88be103..1695164e5 100644
--- a/crypto/test/src/util/test/SimpleTest.cs
+++ b/crypto/test/src/util/test/SimpleTest.cs
@@ -108,7 +108,7 @@ namespace Org.BouncyCastle.Utilities.Test
             }
             catch (TestFailedException e)
             {
-                return e.GetResult();
+                return e.Result;
             }
             catch (Exception e)
             {
diff --git a/crypto/test/src/util/test/TestFailedException.cs b/crypto/test/src/util/test/TestFailedException.cs
index 215e1fd20..2ea66087d 100644
--- a/crypto/test/src/util/test/TestFailedException.cs
+++ b/crypto/test/src/util/test/TestFailedException.cs
@@ -2,23 +2,20 @@ using System;
 
 namespace Org.BouncyCastle.Utilities.Test
 {
-#if !PORTABLE
-    [Serializable]
-#endif
     public class TestFailedException
         : Exception
     {
-        private ITestResult _result;
+        private readonly ITestResult m_result;
 
-        public TestFailedException(
-            ITestResult result)
+        public TestFailedException(ITestResult result)
+            : base()
         {
-            _result = result;
+            m_result = result;
         }
 
-        public ITestResult GetResult()
+        public ITestResult Result
         {
-            return _result;
+            get { return m_result; }
         }
     }
 }