use of com.sequenceiq.environment.credential.domain.CredentialView in project cloudbreak by hortonworks.
the class CredentialViewConverterTest method testConvertCredential.
@Test
void testConvertCredential() {
Credential credential = new Credential();
credential.setName(CRED_NAME);
credential.setCloudPlatform(CLOUD_PLATFORM);
credential.setCreator(CREATOR);
credential.setResourceCrn(CRN);
credential.setDescription(DESCRIPTION);
credential.setVerificationStatusText(VERIFICATION_STATUS_TEXT);
credential.setType(CredentialType.ENVIRONMENT);
credential.setGovCloud(true);
CredentialView result = underTest.convert(credential);
assertEquals(CRED_NAME, result.getName());
assertEquals(CLOUD_PLATFORM, result.getCloudPlatform());
assertEquals(CREATOR, result.getCreator());
assertEquals(CRN, result.getResourceCrn());
assertEquals(DESCRIPTION, result.getDescription());
assertEquals(VERIFICATION_STATUS_TEXT, result.getVerificationStatusText());
assertEquals(CredentialType.ENVIRONMENT, result.getType());
assertTrue(result.getGovCloud());
}
use of com.sequenceiq.environment.credential.domain.CredentialView in project cloudbreak by hortonworks.
the class CredentialViewConverterTest method testConvertCredentialView.
@Test
void testConvertCredentialView() {
CredentialView credentialView = new CredentialView();
credentialView.setName(CRED_NAME);
credentialView.setCloudPlatform(CLOUD_PLATFORM);
credentialView.setCreator(CREATOR);
credentialView.setResourceCrn(CRN);
credentialView.setDescription(DESCRIPTION);
credentialView.setVerificationStatusText(VERIFICATION_STATUS_TEXT);
credentialView.setType(CredentialType.ENVIRONMENT);
credentialView.setGovCloud(true);
CredentialViewResponse result = underTest.convert(credentialView);
assertEquals(CRED_NAME, result.getName());
assertEquals(CLOUD_PLATFORM, result.getCloudPlatform());
assertEquals(CREATOR, result.getCreator());
assertEquals(CRN, result.getCrn());
assertEquals(DESCRIPTION, result.getDescription());
assertEquals(VERIFICATION_STATUS_TEXT, result.getVerificationStatusText());
assertEquals(CredentialType.ENVIRONMENT, result.getType());
assertTrue(result.getGovCloud());
}
use of com.sequenceiq.environment.credential.domain.CredentialView in project cloudbreak by hortonworks.
the class CredentialViewConverter method convert.
public CredentialView convert(Credential credential) {
CredentialView credentialView = new CredentialView();
credentialView.setAccountId(credential.getAccountId());
credentialView.setArchived(credential.isArchived());
credentialView.setCloudPlatform(credential.getCloudPlatform());
credentialView.setCreator(credential.getCreator());
credentialView.setDescription(credential.getDescription());
credentialView.setGovCloud(credential.getGovCloud());
credentialView.setName(credential.getName());
credentialView.setResourceCrn(credential.getResourceCrn());
credentialView.setVerificationStatusText(credential.getVerificationStatusText());
credentialView.setType(credential.getType());
return credentialView;
}
Aggregations