Class CSRBuilderTest

java.lang.Object
org.shredzone.acme4j.util.CSRBuilderTest

public class CSRBuilderTest extends Object
Unit tests for CSRBuilder.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Add provider, create some key pairs
    void
    Checks that addValue behaves correctly in dependence of the attributes being added.
    void
    Test if the generated CSR is plausible using a ECDSA key.
    void
    Test if the generated CSR is plausible.
    void
    Make sure an exception is thrown when no domain is set.
    void
    Make sure all getters will fail if the CSR is not signed.
    void
    Make sure an exception is thrown when an unknown identifier type is used.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setup

      @BeforeAll public static void setup()
      Add provider, create some key pairs
    • testGenerate

      @Test public void testGenerate() throws IOException
      Test if the generated CSR is plausible.
      Throws:
      IOException
    • testECCGenerate

      @Test public void testECCGenerate() throws IOException
      Test if the generated CSR is plausible using a ECDSA key.
      Throws:
      IOException
    • testNoDomain

      @Test public void testNoDomain()
      Make sure an exception is thrown when no domain is set.
    • testUnknownType

      @Test public void testUnknownType()
      Make sure an exception is thrown when an unknown identifier type is used.
    • testNoSign

      @Test public void testNoSign()
      Make sure all getters will fail if the CSR is not signed.
    • testAddAttrValues

      @Test public void testAddAttrValues()
      Checks that addValue behaves correctly in dependence of the attributes being added. If a common name is set, it should be handled in the same way when it's added by using addDomain