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-29 14:15:10 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-29 14:15:10 +0700
commit435210f10fd927653ce8fbc04ec537ae5d8966b6 (patch)
tree27b6ed1c029db271c3429ac57629d7f0156c5fed /crypto/test/src/util
parentRefactoring around Platform (diff)
downloadBouncyCastle.NET-ed25519-435210f10fd927653ce8fbc04ec537ae5d8966b6.tar.xz
Generics migration complete
Diffstat (limited to 'crypto/test/src/util')
-rw-r--r--crypto/test/src/util/io/pem/test/AllTests.cs24
-rw-r--r--crypto/test/src/util/test/SimpleTest.cs6
2 files changed, 15 insertions, 15 deletions
diff --git a/crypto/test/src/util/io/pem/test/AllTests.cs b/crypto/test/src/util/io/pem/test/AllTests.cs
index 9a413450d..88ccf2e40 100644
--- a/crypto/test/src/util/io/pem/test/AllTests.cs
+++ b/crypto/test/src/util/io/pem/test/AllTests.cs
@@ -1,5 +1,5 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.IO;
 
 using NUnit.Framework;
@@ -14,20 +14,20 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests
 		{
 			for (int i = 1; i != 60; i++)
 			{
-				LengthTest("CERTIFICATE", new ArrayList(), new byte[i]);
+				LengthTest("CERTIFICATE", new List<PemHeader>(), 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 List<PemHeader>(), new byte[100]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), new byte[101]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), new byte[102]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), 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 List<PemHeader>(), new byte[1000]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), new byte[1001]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), new byte[1002]);
+			LengthTest("CERTIFICATE", new List<PemHeader>(), new byte[1003]);
 
-			IList headers = new ArrayList();
+			var headers = new List<PemHeader>();
 			headers.Add(new PemHeader("Proc-Type", "4,ENCRYPTED"));
 			headers.Add(new PemHeader("DEK-Info", "DES3,0001020304050607"));
 			LengthTest("RSA PRIVATE KEY", headers, new byte[103]);
@@ -48,7 +48,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests
             }
         }
 
-		private void LengthTest(string type, IList headers, byte[] data)
+		private void LengthTest(string type, IList<PemHeader> headers, byte[] data)
 		{
 			StringWriter sw = new StringWriter();
 			PemWriter pWrt = new PemWriter(sw);
diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs
index 1695164e5..91c493ef7 100644
--- a/crypto/test/src/util/test/SimpleTest.cs
+++ b/crypto/test/src/util/test/SimpleTest.cs
@@ -1,5 +1,5 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.IO;
 using System.Reflection;
 
@@ -148,7 +148,7 @@ namespace Org.BouncyCastle.Utilities.Test
 		{
 			string fullPrefix = GetFullName(prefix);
 
-			ArrayList result = new ArrayList();
+			var result = new List<string>();
 			string[] fullNames = GetAssembly().GetManifestResourceNames();
 			foreach (string fullName in fullNames)
 			{
@@ -158,7 +158,7 @@ namespace Org.BouncyCastle.Utilities.Test
 					result.Add(name);
 				}
 			}
-			return (string[])result.ToArray(typeof(string));
+            return result.ToArray();
 		}
 
         private static Assembly GetAssembly()