Search in sources :

Example 6 with FailurePolicyResponse

use of com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse in project cloudbreak by hortonworks.

the class FailurePolicyRequestToFailurePolicyConverterTest method testConvert.

@Test
public void testConvert() {
    // GIVEN
    // WHEN
    FailurePolicyResponse result = underTest.convert(getRequest("stack/failure-policy.json"));
    // THEN
    assertAllFieldsNotNull(result);
}
Also used : FailurePolicyResponse(com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse) Test(org.junit.Test)

Example 7 with FailurePolicyResponse

use of com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse in project cloudbreak by hortonworks.

the class FailurePolicyRequestToFailurePolicyConverterTest method testConvertWithoutThreshold.

@Test
public void testConvertWithoutThreshold() {
    // GIVEN
    // WHEN
    FailurePolicyResponse result = underTest.convert(getRequest("stack/failure-policy-without-threshold.json"));
    // THEN
    assertAllFieldsNotNull(result);
}
Also used : FailurePolicyResponse(com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse) Test(org.junit.Test)

Example 8 with FailurePolicyResponse

use of com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse in project cloudbreak by hortonworks.

the class FailurePolicyToFailurePolicyResponseConverterTest method testConvert.

@Test
public void testConvert() {
    // GIVEN
    // WHEN
    FailurePolicyResponse result = underTest.convert(getSource());
    // THEN
    assertEquals(AdjustmentType.BEST_EFFORT, result.getAdjustmentType());
    assertAllFieldsNotNull(result);
}
Also used : FailurePolicyResponse(com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse) Test(org.junit.Test)

Aggregations

FailurePolicyResponse (com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse)8 Test (org.junit.Test)7 CloudbreakDetailsJson (com.sequenceiq.cloudbreak.api.model.CloudbreakDetailsJson)4 CredentialResponse (com.sequenceiq.cloudbreak.api.model.CredentialResponse)4 ImageJson (com.sequenceiq.cloudbreak.api.model.ImageJson)4 InstanceGroupRequest (com.sequenceiq.cloudbreak.api.model.InstanceGroupRequest)4 OrchestratorResponse (com.sequenceiq.cloudbreak.api.model.OrchestratorResponse)4 StackAuthenticationResponse (com.sequenceiq.cloudbreak.api.model.StackAuthenticationResponse)4 StackResponse (com.sequenceiq.cloudbreak.api.model.StackResponse)4 TypeDescriptor (org.springframework.core.convert.TypeDescriptor)4 ClusterResponse (com.sequenceiq.cloudbreak.api.model.ClusterResponse)3 NetworkResponse (com.sequenceiq.cloudbreak.api.model.NetworkResponse)3