use of com.sequenceiq.cloudbreak.api.model.CustomConfigurationPropertyParameters in project cloudbreak by hortonworks.
the class CustomConfigurationPropertyConverterTest method testConvertFromCustomConfigurationPropertyParameters.
@Test
void testConvertFromCustomConfigurationPropertyParameters() {
CustomConfigurationPropertyParameters property = new CustomConfigurationPropertyParameters();
property.setName(TEST_PROPERTY_NAME);
property.setValue(TEST_PROPERTY_VALUE);
property.setRoleType(TEST_ROLE);
property.setServiceType(TEST_SERVICE);
CustomConfigurationProperty result = underTest.convertFromRequestJson(property);
assertEquals(TEST_PROPERTY_NAME, result.getName());
assertEquals(TEST_PROPERTY_VALUE, result.getValue());
assertEquals(TEST_ROLE, result.getRoleType());
assertEquals(TEST_SERVICE, result.getServiceType());
}
use of com.sequenceiq.cloudbreak.api.model.CustomConfigurationPropertyParameters in project cloudbreak by hortonworks.
the class CustomConfigurationsToCustomConfigurationsV4ResponseConverterTest method testConvertResponseContainsCorrectCustomConfigsProperties.
@Test
void testConvertResponseContainsCorrectCustomConfigsProperties() {
Set<CustomConfigurationPropertyParameters> properties = customConfigurations.getConfigurations().stream().map(c -> customConfigurationPropertyConverter.convertToResponseJson(c)).collect(Collectors.toSet());
CustomConfigurationsV4Response response = underTest.convert(customConfigurations);
Set<CustomConfigurationPropertyParameters> result = response.getConfigurations();
assertEquals(properties, result);
}
use of com.sequenceiq.cloudbreak.api.model.CustomConfigurationPropertyParameters in project cloudbreak by hortonworks.
the class CustomConfigurationPropertyConverterTest method testConvertToCustomConfigurationPropertyParameters.
@Test
void testConvertToCustomConfigurationPropertyParameters() {
CustomConfigurationProperty property = new CustomConfigurationProperty();
property.setName(TEST_PROPERTY_NAME);
property.setSecretValue(TEST_PROPERTY_VALUE);
property.setRoleType(TEST_ROLE);
property.setServiceType(TEST_SERVICE);
CustomConfigurationPropertyParameters result = underTest.convertToResponseJson(property);
assertEquals(TEST_PROPERTY_NAME, result.getName());
assertEquals(TEST_PROPERTY_VALUE, result.getValue());
assertEquals(TEST_ROLE, result.getRoleType());
assertEquals(TEST_SERVICE, result.getServiceType());
}
use of com.sequenceiq.cloudbreak.api.model.CustomConfigurationPropertyParameters in project cloudbreak by hortonworks.
the class CustomConfigurationPropertyConverter method convertToResponseJson.
public CustomConfigurationPropertyParameters convertToResponseJson(CustomConfigurationProperty source) {
CustomConfigurationPropertyParameters response = new CustomConfigurationPropertyParameters();
response.setName(source.getName());
response.setValue(source.getValue());
response.setRoleType(source.getRoleType());
response.setServiceType(source.getServiceType());
return response;
}
Aggregations