package ch.admin.bit.edec.dsig.builder;

import ch.admin.bit.edec.dsig.TestUtil;
import org.junit.Before;
import org.junit.Test;

import java.security.cert.X509CRL;

import static org.junit.Assert.assertNotNull;

/**
 * Tests for the class {@link X509CRLBuilder}.
 */
public class X509CRLBuilderTest {

  private X509CRLBuilder builder;

  @Before public void setUp() {
    builder = new X509CRLBuilder(TestUtil.createSystemContext());
  }

  @Test public void testCreateCRLFromPath() throws Exception {
    X509CRL x509CRL = builder.createCRLFromPath(TestUtil.getFile(TestUtil.SWISS_GOV_CRL));
    assertNotNull(x509CRL);
  }

}
