summary refs log tree commit diff
path: root/crypto/test/src/asn1/test/CertificateTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/test/src/asn1/test/CertificateTest.cs')
-rw-r--r--crypto/test/src/asn1/test/CertificateTest.cs12
1 files changed, 2 insertions, 10 deletions
diff --git a/crypto/test/src/asn1/test/CertificateTest.cs b/crypto/test/src/asn1/test/CertificateTest.cs
index 52c5ed1dc..ad1fc8232 100644
--- a/crypto/test/src/asn1/test/CertificateTest.cs
+++ b/crypto/test/src/asn1/test/CertificateTest.cs
@@ -399,11 +399,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 
 			// Attributes
 			Asn1Sequence attribSeq = acInfo.Attributes;
-			AttributeX509[] att = new AttributeX509[attribSeq.Count];
-			for (int i = 0; i < attribSeq.Count; i++)
-			{
-				att[i] = AttributeX509.GetInstance(attribSeq[i]);
-			}
+			AttributeX509[] att = attribSeq.MapElements(AttributeX509.GetInstance);
 
 			// IssuerUniqueId
 			// TODO, how to best test?
@@ -465,11 +461,7 @@ namespace Org.BouncyCastle.Asn1.Tests
 
 			// Attributes
 			Asn1Sequence attribSeq = acInfo.Attributes;
-			AttributeX509[] att = new AttributeX509[attribSeq.Count];
-			for (int i = 0; i < attribSeq.Count; i++)
-			{
-				att[i] = AttributeX509.GetInstance(attribSeq[i]);
-			}
+            AttributeX509[] att = attribSeq.MapElements(AttributeX509.GetInstance);
 
 			// IssuerUniqueId
 			// TODO, how to best test?