Search in sources :

Example 1 with FeatureState

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState in project cloudbreak by hortonworks.

the class InternalClusterTemplateValidatorTest method internalClusterTemplateValidatorDataWithDefaultClusterTemplateV4RequestObject.

@ParameterizedTest(name = "state = {0} internalTenant = {1} expectedShouldPopulate = {2}")
@MethodSource("internalClusterTemplateValidatorData")
public void internalClusterTemplateValidatorDataWithDefaultClusterTemplateV4RequestObject(FeatureState state, boolean internalTenant, boolean expectedShouldPopulate) {
    DefaultClusterTemplateV4Request clusterTemplate = new DefaultClusterTemplateV4Request();
    clusterTemplate.setFeatureState(state);
    boolean shouldPopulate = underTest.shouldPopulate(clusterTemplate, internalTenant);
    Assert.assertEquals(expectedShouldPopulate, shouldPopulate);
}
Also used : DefaultClusterTemplateV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.clustertemplate.requests.DefaultClusterTemplateV4Request) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 2 with FeatureState

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState in project cloudbreak by hortonworks.

the class FeatureStateConverterTest method testConvertToEntityAttributeWhenNotKnownIsReturnAsReleased.

@Test
public void testConvertToEntityAttributeWhenNotKnownIsReturnAsReleased() {
    FeatureState featureState = featureStateConverter.convertToEntityAttribute("not-known");
    Assert.assertEquals(FeatureState.RELEASED, featureState);
}
Also used : FeatureState(com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState) Test(org.junit.Test)

Example 3 with FeatureState

use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState in project cloudbreak by hortonworks.

the class FeatureStateConverterTest method testConvertToEntityAttributeWhenReleasedIsReturnAsReleased.

@Test
public void testConvertToEntityAttributeWhenReleasedIsReturnAsReleased() {
    FeatureState featureState = featureStateConverter.convertToEntityAttribute("RELEASED");
    Assert.assertEquals(FeatureState.RELEASED, featureState);
}
Also used : FeatureState(com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState) Test(org.junit.Test)

Aggregations

FeatureState (com.sequenceiq.cloudbreak.api.endpoint.v4.common.FeatureState)2 Test (org.junit.Test)2 DefaultClusterTemplateV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.clustertemplate.requests.DefaultClusterTemplateV4Request)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1