summary refs log tree commit diff
path: root/crypto/test/src/util
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@gmail.com>2022-06-23 01:24:31 +0700
committerPeter Dettman <peter.dettman@gmail.com>2022-06-23 01:24:31 +0700
commit99affc58acf520f25ac7365ad6bb895da8c04a0a (patch)
tree4c85ff5e1009a652cc2971ccdc4083e0dfede805 /crypto/test/src/util
parentRemove Main methods from test classes (diff)
downloadBouncyCastle.NET-ed25519-99affc58acf520f25ac7365ad6bb895da8c04a0a.tar.xz
Cleanup redundant test classes
Diffstat (limited to 'crypto/test/src/util')
-rw-r--r--crypto/test/src/util/io/pem/test/AllTests.cs43
1 files changed, 13 insertions, 30 deletions
diff --git a/crypto/test/src/util/io/pem/test/AllTests.cs b/crypto/test/src/util/io/pem/test/AllTests.cs
index b6d1ef2f3..9a413450d 100644
--- a/crypto/test/src/util/io/pem/test/AllTests.cs
+++ b/crypto/test/src/util/io/pem/test/AllTests.cs
@@ -2,9 +2,6 @@ using System;
 using System.Collections;
 using System.IO;
 
-#if !LIB
-using NUnit.Core;
-#endif
 using NUnit.Framework;
 
 namespace Org.BouncyCastle.Utilities.IO.Pem.Tests
@@ -12,41 +9,28 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests
 	[TestFixture]
 	public class AllTests
 	{
-#if !LIB
-        [Suite]
-        public static TestSuite Suite
-        {
-            get
-            {
-                TestSuite suite = new TestSuite("PEM Utilities Tests");
-                suite.Add(new AllTests());
-                return suite;
-            }
-        }
-#endif
-
         [Test]
 		public void TestPemLength()
 		{
 			for (int i = 1; i != 60; i++)
 			{
-				lengthTest("CERTIFICATE", new ArrayList(), new byte[i]);
+				LengthTest("CERTIFICATE", new ArrayList(), new byte[i]);
 			}
 
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[100]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[101]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[102]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[103]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[100]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[101]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[102]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[103]);
 
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[1000]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[1001]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[1002]);
-			lengthTest("CERTIFICATE", new ArrayList(), new byte[1003]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[1000]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[1001]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[1002]);
+			LengthTest("CERTIFICATE", new ArrayList(), new byte[1003]);
 
 			IList headers = new ArrayList();
 			headers.Add(new PemHeader("Proc-Type", "4,ENCRYPTED"));
 			headers.Add(new PemHeader("DEK-Info", "DES3,0001020304050607"));
-			lengthTest("RSA PRIVATE KEY", headers, new byte[103]);
+			LengthTest("RSA PRIVATE KEY", headers, new byte[103]);
 		}
 
         [Test]
@@ -57,15 +41,14 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests
 				PemReader rd = new PemReader(new StringReader("-----BEGIN \n"));
 				rd.ReadPemObject();
 				Assert.Fail("must fail on malformed");
-			} catch (IOException ioex)
+			}
+			catch (IOException ioex)
             {
 				Assert.AreEqual("ran out of data before consuming type", ioex.Message);
             }
-
-           
         }
 
-		private void lengthTest(string type, IList headers, byte[] data)
+		private void LengthTest(string type, IList headers, byte[] data)
 		{
 			StringWriter sw = new StringWriter();
 			PemWriter pWrt = new PemWriter(sw);