Search in sources :

Example 1 with PermissionedCredentialService

use of org.cloudfoundry.credhub.service.PermissionedCredentialService in project credhub by cloudfoundry-incubator.

the class CredentialsHandlerTest method beforeEach.

@Before
public void beforeEach() {
    Encryptor encryptor = mock(Encryptor.class);
    permissionedCredentialService = mock(PermissionedCredentialService.class);
    permissionCheckingService = mock(PermissionCheckingService.class);
    subject = new CredentialsHandler(permissionedCredentialService);
    userContext = mock(UserContext.class);
    when(userContext.getActor()).thenReturn(USER);
    version1 = new SshCredentialVersion(CREDENTIAL_NAME);
    version1.setVersionCreatedAt(VERSION1_CREATED_AT);
    version1.setEncryptor(encryptor);
    version2 = new SshCredentialVersion(CREDENTIAL_NAME);
    version2.setVersionCreatedAt(VERSION2_CREATED_AT);
    version2.setEncryptor(encryptor);
}
Also used : PermissionCheckingService(org.cloudfoundry.credhub.service.PermissionCheckingService) PermissionedCredentialService(org.cloudfoundry.credhub.service.PermissionedCredentialService) UserContext(org.cloudfoundry.credhub.auth.UserContext) Encryptor(org.cloudfoundry.credhub.domain.Encryptor) SshCredentialVersion(org.cloudfoundry.credhub.domain.SshCredentialVersion) Before(org.junit.Before)

Aggregations

UserContext (org.cloudfoundry.credhub.auth.UserContext)1 Encryptor (org.cloudfoundry.credhub.domain.Encryptor)1 SshCredentialVersion (org.cloudfoundry.credhub.domain.SshCredentialVersion)1 PermissionCheckingService (org.cloudfoundry.credhub.service.PermissionCheckingService)1 PermissionedCredentialService (org.cloudfoundry.credhub.service.PermissionedCredentialService)1 Before (org.junit.Before)1