use of com.sequenceiq.cloudbreak.api.model.PlatformVariantsJson in project cloudbreak by hortonworks.
the class PlatformVariantsToPlatformVariantsJsonConverterTest method testConvert.
@Test
public void testConvert() {
// GIVEN
// WHEN
PlatformVariantsJson result = underTest.convert(getSource());
// THEN
assertTrue(result.getPlatformToVariants().get(PLATFORM.value()).contains(VARIANT_1.value()));
assertEquals(VARIANT_2.value(), result.getDefaultVariants().get(PLATFORM.value()));
assertAllFieldsNotNull(result);
}
use of com.sequenceiq.cloudbreak.api.model.PlatformVariantsJson in project cloudbreak by hortonworks.
the class PlatformVariantsToPlatformVariantsJsonConverter method convert.
@Override
public PlatformVariantsJson convert(PlatformVariants source) {
PlatformVariantsJson json = new PlatformVariantsJson();
json.setPlatformToVariants(PlatformConverterUtil.convertPlatformMap(source.getPlatformToVariants()));
json.setDefaultVariants(PlatformConverterUtil.convertDefaults(source.getDefaultVariants()));
return json;
}
Aggregations