added style test.
"CN=\\ Test X\\ ,O=\\ Test,C=GB" // expected
};
+ private static final String dnqSubject = "DNQ=Legion of the Bouncy Castle Inc.";
+
public String getName()
{
return "X500Name";
@@ -178,6 +180,11 @@ public void performTest()
fail("Failed same object test");
}
+ // basic style test
+ X500Name dnqName = new X500Name(DNQStyle.INSTANCE, dnqSubject);
+
+ isEquals(dnqName.toString(), "DNQ=Legion of the Bouncy Castle Inc.");
+
// if (!name1.equals(name1, true))
// {
// fail("Failed same object test - in Order");
@@ -668,6 +675,18 @@ private void ietfUtilsTest()
IETFUtils.valueToString(new DERUTF8String(" "));
}
+ public static class DNQStyle
+ extends BCStyle
+ {
+ public static final DNQStyle INSTANCE = new DNQStyle();
+
+ private DNQStyle()
+ {
+ defaultLookUp.put("dnq", BCStyle.DN_QUALIFIER);
+ defaultSymbols.put(BCStyle.DN_QUALIFIER, "DNQ");
+ }
+ }
+
/*
private boolean compareVectors(Vector a, Vector b) // for compatibility with early JDKs
{
