Class AccountBuilderTest

java.lang.Object
org.shredzone.acme4j.AccountBuilderTest

public class AccountBuilderTest extends Object
Unit tests for AccountBuilder.
  • Constructor Details

  • Method Details

    • testRegistration

      @Test public void testRegistration() throws Exception
      Test if a new account can be created.
      Throws:
      Exception
    • testRegistrationWithKid

      @ParameterizedTest @CsvSource({"SHA-256,HS256,","SHA-384,HS384,","SHA-512,HS512,","SHA-256,HS256,HS256","SHA-384,HS384,HS384","SHA-512,HS512,HS512","SHA-512,HS256,HS256"}) public void testRegistrationWithKid(String keyAlg, String expectedMacAlg, @Nullable String macAlg) throws Exception
      Test if a new account with Key Identifier can be created.
      Throws:
      Exception
    • testRejectInvalidMacAlg

      @ParameterizedTest @NullAndEmptySource @ValueSource(strings={"foo","null","false","none","HS-256","hs256","HS128","RS256"}) public void testRejectInvalidMacAlg(@Nullable String macAlg)
      Test if invalid mac algorithms are rejected.
    • testOnlyExistingRegistration

      @Test public void testOnlyExistingRegistration() throws Exception
      Test if an existing account is properly returned.
      Throws:
      Exception
    • testEmailAddresses

      @Test public void testEmailAddresses()