Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.asn1.test;
 
 
PKIFailureInfoTest
public class PKIFailureInfoTest
    extends SimpleTest
    // A correct hex encoded BAD_DATA_FORMAT PKIFailureInfo 
    private static final byte[] CORRECT_FAILURE_INFO = Base64.decode("AwIANQ==");
    
    public String getName()
    {
        return "PKIFailureInfo";
    }
    
    private void testEncoding()
        throws IOException
    {
        PKIFailureInfo correct = new PKIFailureInfo(bitString);
                        
        if (!areEqual(correct.getEncoded(.),bug.getEncoded(.)))
        {
            fail("encoding doesn't match");
        }
    }
    
    public void performTest()
        throws IOException
    {
        BitStringConstantTester.testFlagValueCorrect(0, .);
        BitStringConstantTester.testFlagValueCorrect(1, .);
        BitStringConstantTester.testFlagValueCorrect(2, .);
        BitStringConstantTester.testFlagValueCorrect(3, .);
        BitStringConstantTester.testFlagValueCorrect(4, .);
        BitStringConstantTester.testFlagValueCorrect(5, .);
        BitStringConstantTester.testFlagValueCorrect(6, .);
        BitStringConstantTester.testFlagValueCorrect(7, .);
        BitStringConstantTester.testFlagValueCorrect(8, .);
        BitStringConstantTester.testFlagValueCorrect(9, .);
        BitStringConstantTester.testFlagValueCorrect(14, .);
        BitStringConstantTester.testFlagValueCorrect(15, .);
        BitStringConstantTester.testFlagValueCorrect(16, .);
        BitStringConstantTester.testFlagValueCorrect(17, .);
        BitStringConstantTester.testFlagValueCorrect(25, .);
        testEncoding();
    }
    public static void main(
        String[]    args)
    {
        runTest(new PKIFailureInfoTest());
    }
New to GrepCode? Check out our FAQ X