Search in sources :

Example 1 with PlatformVariantsJson

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);
}
Also used : PlatformVariantsJson(com.sequenceiq.cloudbreak.api.model.PlatformVariantsJson) Test(org.junit.Test)

Example 2 with PlatformVariantsJson

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;
}
Also used : PlatformVariantsJson(com.sequenceiq.cloudbreak.api.model.PlatformVariantsJson)

Aggregations

PlatformVariantsJson (com.sequenceiq.cloudbreak.api.model.PlatformVariantsJson)2 Test (org.junit.Test)1