Search in sources :

Example 6 with StackAuthenticationResponse

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

the class StackToStackResponseConverterTest method testConvert.

@Test
public void testConvert() {
    // GIVEN
    given(conversionService.convert(any(Object.class), any(Class.class))).willReturn(new ImageJson()).willReturn(new StackAuthenticationResponse()).willReturn(new CredentialResponse()).willReturn(new ClusterResponse()).willReturn(new FailurePolicyResponse()).willReturn(new NetworkResponse()).willReturn(new OrchestratorResponse()).willReturn(new CloudbreakDetailsJson());
    given(conversionService.convert(any(Object.class), any(TypeDescriptor.class), any(TypeDescriptor.class))).willReturn(new HashSet<InstanceGroupRequest>());
    // WHEN
    StackResponse result = underTest.convert(getSource());
    // THEN
    assertAllFieldsNotNull(result, Arrays.asList("platformVariant", "ambariVersion", "hdpVersion", "flexSubscription"));
}
Also used : InstanceGroupRequest(com.sequenceiq.cloudbreak.api.model.InstanceGroupRequest) CloudbreakDetailsJson(com.sequenceiq.cloudbreak.api.model.CloudbreakDetailsJson) ClusterResponse(com.sequenceiq.cloudbreak.api.model.ClusterResponse) CredentialResponse(com.sequenceiq.cloudbreak.api.model.CredentialResponse) OrchestratorResponse(com.sequenceiq.cloudbreak.api.model.OrchestratorResponse) FailurePolicyResponse(com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse) TypeDescriptor(org.springframework.core.convert.TypeDescriptor) ImageJson(com.sequenceiq.cloudbreak.api.model.ImageJson) NetworkResponse(com.sequenceiq.cloudbreak.api.model.NetworkResponse) StackAuthenticationResponse(com.sequenceiq.cloudbreak.api.model.StackAuthenticationResponse) StackResponse(com.sequenceiq.cloudbreak.api.model.StackResponse) Test(org.junit.Test)

Aggregations

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