summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2017-09-17 18:47:43 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2017-09-17 18:47:43 +0700
commitb30a73590e054908e41231dfd200881dcaea0907 (patch)
treef1ab227d10d91f9bee6e32f26c324956c6a394b1 /crypto/test
parentSketch out test changes for ECGOST3410-2012 (diff)
downloadBouncyCastle.NET-ed25519-b30a73590e054908e41231dfd200881dcaea0907.tar.xz
Update SignerLocation to use DirectoryString
- obsolete old UTF8-based methods.
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/asn1/test/SignerLocationUnitTest.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crypto/test/src/asn1/test/SignerLocationUnitTest.cs b/crypto/test/src/asn1/test/SignerLocationUnitTest.cs
index bf20f1fda..650e2fcfd 100644
--- a/crypto/test/src/asn1/test/SignerLocationUnitTest.cs
+++ b/crypto/test/src/asn1/test/SignerLocationUnitTest.cs
@@ -2,8 +2,8 @@ using System;
 
 using NUnit.Framework;
 
-using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.Esf;
+using Org.BouncyCastle.Asn1.X500;
 using Org.BouncyCastle.Utilities.Test;
 
 namespace Org.BouncyCastle.Asn1.Tests
@@ -23,17 +23,17 @@ namespace Org.BouncyCastle.Asn1.Tests
 
             SignerLocation sl = new SignerLocation(countryName, null, null);
 
-            CheckConstruction(sl, countryName, null, null);
+            CheckConstruction(sl, DirectoryString.GetInstance(countryName), null, null);
 
             DerUtf8String localityName = new DerUtf8String("Melbourne");
 
             sl = new SignerLocation(null, localityName, null);
 
-			CheckConstruction(sl, null, localityName, null);
+			CheckConstruction(sl, null, DirectoryString.GetInstance(localityName), null);
 
 			sl = new SignerLocation(countryName, localityName, null);
 
-			CheckConstruction(sl, countryName, localityName, null);
+			CheckConstruction(sl, DirectoryString.GetInstance(countryName), DirectoryString.GetInstance(localityName), null);
 
 			Asn1Sequence postalAddress = new DerSequence(
 				new DerUtf8String("line 1"),
@@ -45,11 +45,11 @@ namespace Org.BouncyCastle.Asn1.Tests
 
             sl = new SignerLocation(countryName, null, postalAddress);
 
-            CheckConstruction(sl, countryName, null, postalAddress);
+            CheckConstruction(sl, DirectoryString.GetInstance(countryName), null, postalAddress);
 
             sl = new SignerLocation(countryName, localityName, postalAddress);
 
-            CheckConstruction(sl, countryName, localityName, postalAddress);
+            CheckConstruction(sl, DirectoryString.GetInstance(countryName), DirectoryString.GetInstance(localityName), postalAddress);
 
             sl = SignerLocation.GetInstance(null);
 
@@ -117,9 +117,9 @@ namespace Org.BouncyCastle.Asn1.Tests
 
 		private void CheckConstruction(
             SignerLocation sl,
-            DerUtf8String  countryName,
-            DerUtf8String  localityName,
-            Asn1Sequence   postalAddress)
+            DirectoryString countryName,
+            DirectoryString localityName,
+            Asn1Sequence postalAddress)
         {
             CheckValues(sl, countryName, localityName, postalAddress);
 
@@ -137,9 +137,9 @@ namespace Org.BouncyCastle.Asn1.Tests
 
 		private void CheckValues(
             SignerLocation sl,
-            DerUtf8String  countryName,
-            DerUtf8String  localityName,
-            Asn1Sequence   postalAddress)
+            DirectoryString countryName,
+            DirectoryString localityName,
+            Asn1Sequence postalAddress)
         {
             if (countryName != null)
             {