public class TemporaryUser
extends org.junit.rules.ExternalResource
before method can be up to 30s.| Constructor and Description |
|---|
TemporaryUser(Supplier<org.apache.sling.testing.clients.SlingClient> creatorSupplier,
String... groups)
Instantiate a new TemporaryUser rule, to be used with the
@Rule annotation. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
protected void |
deleteUsers()
Delete all the created users.
|
protected String |
generateName()
Generate a unique name for the user.
|
protected String |
generatePassword()
Generate a unique password for the user.
|
CQClient |
getClient() |
Supplier<org.apache.sling.testing.clients.SlingClient> |
getClientSupplier() |
public TemporaryUser(Supplier<org.apache.sling.testing.clients.SlingClient> creatorSupplier, String... groups)
@Rule annotation.creatorSupplier - supplier for the client used to create the temporary usergroups - groups to which the temporary user is assignedpublic CQClient getClient()
public Supplier<org.apache.sling.testing.clients.SlingClient> getClientSupplier()
SlingClient Supplier matching the temporary userprotected void before()
throws Throwable
before in class org.junit.rules.ExternalResourceThrowableprotected void after()
after in class org.junit.rules.ExternalResourceprotected String generateName()
protected String generatePassword()
protected void deleteUsers()
Copyright © 2021. All rights reserved.