use of dalvik.annotation.AndroidOnly in project robovm by robovm.
the class X509CRLSelector2Test method testSetMaxCRLNumberLjava_math_BigInteger.
/**
* setMaxCRLNumber(BigInteger maxCRL) method testing. Tests if CRLs with any
* crl number value match the selector in the case of null crlNumber
* criteria, if specified maxCRL value matches the selector, and if CRL with
* inappropriate crlNumber value does not match the selector.
*/
@AndroidOnly("Uses specific class: " + "org.apache.harmony.security.asn1.ASN1OctetString.")
public void testSetMaxCRLNumberLjava_math_BigInteger() {
X509CRLSelector selector = new X509CRLSelector();
BigInteger maxCRL = new BigInteger("10000");
TestCRL crl = new TestCRL(maxCRL);
selector.setMaxCRLNumber(null);
assertTrue("Any CRL should match in the case of null minCRLNumber.", selector.match(crl));
selector.setMaxCRLNumber(maxCRL);
assertTrue("The CRL should match the selection criteria.", selector.match(crl));
selector.setMaxCRLNumber(new BigInteger("9999"));
assertFalse("The CRL should not match the selection criteria.", selector.match(crl));
}
Aggregations