aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java')
-rw-r--r--libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java69
1 files changed, 0 insertions, 69 deletions
diff --git a/libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java b/libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java
deleted file mode 100644
index b1aa29bb7..000000000
--- a/libraries/spongycastle/core/src/test/java/org/spongycastle/asn1/test/AdditionalInformationSyntaxUnitTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.spongycastle.asn1.test;
-
-import java.io.IOException;
-
-import org.spongycastle.asn1.ASN1InputStream;
-import org.spongycastle.asn1.ASN1String;
-import org.spongycastle.asn1.isismtt.x509.AdditionalInformationSyntax;
-import org.spongycastle.asn1.x500.DirectoryString;
-
-public class AdditionalInformationSyntaxUnitTest
- extends ASN1UnitTest
-{
- public String getName()
- {
- return "AdditionalInformationSyntax";
- }
-
- public void performTest()
- throws Exception
- {
- AdditionalInformationSyntax syntax = new AdditionalInformationSyntax("hello world");
-
- checkConstruction(syntax, new DirectoryString("hello world"));
-
- try
- {
- AdditionalInformationSyntax.getInstance(new Object());
-
- fail("getInstance() failed to detect bad object.");
- }
- catch (IllegalArgumentException e)
- {
- // expected
- }
- }
-
- private void checkConstruction(
- AdditionalInformationSyntax syntax,
- DirectoryString information)
- throws IOException
- {
- checkValues(syntax, information);
-
- syntax = AdditionalInformationSyntax.getInstance(syntax);
-
- checkValues(syntax, information);
-
- ASN1InputStream aIn = new ASN1InputStream(syntax.toASN1Object().getEncoded());
-
- ASN1String info = (ASN1String)aIn.readObject();
-
- syntax = AdditionalInformationSyntax.getInstance(info);
-
- checkValues(syntax, information);
- }
-
- private void checkValues(
- AdditionalInformationSyntax syntax,
- DirectoryString information)
- {
- checkMandatoryField("information", information, syntax.getInformation());
- }
-
- public static void main(
- String[] args)
- {
- runTest(new AdditionalInformationSyntaxUnitTest());
- }
-}