Package org.shredzone.acme4j
Class AccountBuilderTest
java.lang.Object
org.shredzone.acme4j.AccountBuilderTest
Unit tests for
AccountBuilder
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Test if an existing account is properly returned.void
Test if a new account can be created.void
testRegistrationWithKid
(String keyAlg, String expectedMacAlg, String macAlg) Test if a new account with Key Identifier can be created.void
testRejectInvalidMacAlg
(String macAlg) Test if invalid mac algorithms are rejected.
-
Constructor Details
-
AccountBuilderTest
public AccountBuilderTest()
-
-
Method Details
-
testRegistration
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 if an existing account is properly returned.- Throws:
Exception
-
testEmailAddresses
-