Java 类org.bouncycastle.asn1.isismtt.x509.AdditionalInformationSyntax 实例源码

项目:gwt-crypto    文件:AdditionalInformationSyntaxUnitTest.java   
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
    }
}
项目:irma_future_id    文件:AdditionalInformationSyntaxUnitTest.java   
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
    }
}
项目:bc-java    文件:AdditionalInformationSyntaxUnitTest.java   
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
    }
}
项目:gwt-crypto    文件:AdditionalInformationSyntaxUnitTest.java   
private void checkConstruction(
    AdditionalInformationSyntax syntax,
    DirectoryString information)
    throws IOException
{
    checkValues(syntax, information);

    syntax = AdditionalInformationSyntax.getInstance(syntax);

    checkValues(syntax, information);

    ASN1InputStream aIn = new ASN1InputStream(syntax.toASN1Primitive().getEncoded());

    ASN1String info = (ASN1String)aIn.readObject();

    syntax = AdditionalInformationSyntax.getInstance(info);

    checkValues(syntax, information);
}
项目:gwt-crypto    文件:AdditionalInformationSyntaxUnitTest.java   
private void checkValues(
    AdditionalInformationSyntax syntax,
    DirectoryString information)
{
    checkMandatoryField("information", information, syntax.getInformation());
}
项目:irma_future_id    文件:AdditionalInformationSyntaxUnitTest.java   
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);
}
项目:irma_future_id    文件:AdditionalInformationSyntaxUnitTest.java   
private void checkValues(
    AdditionalInformationSyntax syntax,
    DirectoryString information)
{
    checkMandatoryField("information", information, syntax.getInformation());
}
项目:bc-java    文件:AdditionalInformationSyntaxUnitTest.java   
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);
}
项目:bc-java    文件:AdditionalInformationSyntaxUnitTest.java   
private void checkValues(
    AdditionalInformationSyntax syntax,
    DirectoryString information)
{
    checkMandatoryField("information", information, syntax.getInformation());
}