Search in sources :

Example 1 with EnvironmentLoadBalancerUpdateRequest

use of com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentLoadBalancerUpdateRequest in project cloudbreak by hortonworks.

the class EnvironmentApiConverterTest method testInitLoadBalancerDto.

@Test
void testInitLoadBalancerDto() {
    Set<String> subnetIds = Set.of("id1, id2");
    EnvironmentLoadBalancerUpdateRequest request = new EnvironmentLoadBalancerUpdateRequest();
    request.setPublicEndpointAccessGateway(PublicEndpointAccessGateway.ENABLED);
    request.setSubnetIds(subnetIds);
    EnvironmentLoadBalancerDto environmentLbDto = underTest.initLoadBalancerDto(request);
    assertEquals(PublicEndpointAccessGateway.ENABLED, environmentLbDto.getEndpointAccessGateway());
    assertEquals(subnetIds, environmentLbDto.getEndpointGatewaySubnetIds());
}
Also used : EnvironmentLoadBalancerDto(com.sequenceiq.environment.environment.dto.EnvironmentLoadBalancerDto) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) EnvironmentLoadBalancerUpdateRequest(com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentLoadBalancerUpdateRequest) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

EnvironmentLoadBalancerUpdateRequest (com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentLoadBalancerUpdateRequest)1 EnvironmentLoadBalancerDto (com.sequenceiq.environment.environment.dto.EnvironmentLoadBalancerDto)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1