improved API key handling
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
package de.muehlencord.shared.account.business.account.boundary;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Joern Muehlencord <joern at muehlencord.de>
|
||||
*/
|
||||
public class ApiKeyServiceTest {
|
||||
|
||||
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ApiKeyServiceTest.class);
|
||||
|
||||
@Test
|
||||
public void testCreateApiKey() {
|
||||
try {
|
||||
ApiKeyService apiKeyService = new ApiKeyService();
|
||||
apiKeyService.createNewApiKey("web", (short) 120);
|
||||
} catch (ApiKeyException ex) {
|
||||
LOGGER.error(ex.getMessage());
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Detailed stacktrace", new Object[]{ex});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user