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

项目:gwt-crypto    文件:RestrictionUnitTest.java   
public void performTest()
    throws Exception
{
    DirectoryString res = new DirectoryString("test");
    Restriction restriction = new Restriction(res.getString());

    checkConstruction(restriction, res);

    try
    {
        Restriction.getInstance(new Object());

        fail("getInstance() failed to detect bad object.");
    }
    catch (IllegalArgumentException e)
    {
        // expected
    }
}
项目:irma_future_id    文件:RestrictionUnitTest.java   
public void performTest()
    throws Exception
{
    DirectoryString res = new DirectoryString("test");
    Restriction restriction = new Restriction(res.getString());

    checkConstruction(restriction, res);

    try
    {
        Restriction.getInstance(new Object());

        fail("getInstance() failed to detect bad object.");
    }
    catch (IllegalArgumentException e)
    {
        // expected
    }
}
项目:bc-java    文件:RestrictionUnitTest.java   
public void performTest()
    throws Exception
{
    DirectoryString res = new DirectoryString("test");
    Restriction restriction = new Restriction(res.getString());

    checkConstruction(restriction, res);

    try
    {
        Restriction.getInstance(new Object());

        fail("getInstance() failed to detect bad object.");
    }
    catch (IllegalArgumentException e)
    {
        // expected
    }
}
项目:gwt-crypto    文件:RestrictionUnitTest.java   
private void checkConstruction(
    Restriction restriction,
    DirectoryString res)
    throws IOException
{
    checkValues(restriction, res);

    restriction = Restriction.getInstance(restriction);

    checkValues(restriction, res);

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

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

    restriction = Restriction.getInstance(str);

    checkValues(restriction, res);
}
项目:gwt-crypto    文件:RestrictionUnitTest.java   
private void checkValues(
    Restriction restriction,
    DirectoryString res)
{
    checkMandatoryField("restriction", res, restriction.getRestriction());
}
项目:irma_future_id    文件:RestrictionUnitTest.java   
private void checkConstruction(
    Restriction restriction,
    DirectoryString res)
    throws IOException
{
    checkValues(restriction, res);

    restriction = Restriction.getInstance(restriction);

    checkValues(restriction, res);

    ASN1InputStream aIn = new ASN1InputStream(restriction.toASN1Object().getEncoded());

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

    restriction = Restriction.getInstance(str);

    checkValues(restriction, res);
}
项目:irma_future_id    文件:RestrictionUnitTest.java   
private void checkValues(
    Restriction restriction,
    DirectoryString res)
{
    checkMandatoryField("restriction", res, restriction.getRestriction());
}
项目:bc-java    文件:RestrictionUnitTest.java   
private void checkConstruction(
    Restriction restriction,
    DirectoryString res)
    throws IOException
{
    checkValues(restriction, res);

    restriction = Restriction.getInstance(restriction);

    checkValues(restriction, res);

    ASN1InputStream aIn = new ASN1InputStream(restriction.toASN1Object().getEncoded());

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

    restriction = Restriction.getInstance(str);

    checkValues(restriction, res);
}
项目:bc-java    文件:RestrictionUnitTest.java   
private void checkValues(
    Restriction restriction,
    DirectoryString res)
{
    checkMandatoryField("restriction", res, restriction.getRestriction());
}