Search in sources :

Example 1 with SwitchPatchDto

use of org.openkilda.northbound.dto.v2.switches.SwitchPatchDto in project open-kilda by telstra.

the class SwitchMapperTest method testSwitchPatchDtoToSwitchPatch.

@Test
public void testSwitchPatchDtoToSwitchPatch() {
    SwitchPatchDto switchPatchDto = new SwitchPatchDto("pop", new SwitchLocationDtoV2(48.860611, 2.337633, "street", "city", "country"));
    SwitchPatch switchPatch = switchMapper.map(switchPatchDto);
    assertEquals(switchPatchDto.getPop(), switchPatch.getPop());
    assertEquals(switchPatchDto.getLocation().getLatitude(), switchPatch.getLocation().getLatitude());
    assertEquals(switchPatchDto.getLocation().getLongitude(), switchPatch.getLocation().getLongitude());
    assertEquals(switchPatchDto.getLocation().getStreet(), switchPatch.getLocation().getStreet());
    assertEquals(switchPatchDto.getLocation().getCity(), switchPatch.getLocation().getCity());
    assertEquals(switchPatchDto.getLocation().getCountry(), switchPatch.getLocation().getCountry());
}
Also used : SwitchLocationDtoV2(org.openkilda.northbound.dto.v2.switches.SwitchLocationDtoV2) SwitchPatchDto(org.openkilda.northbound.dto.v2.switches.SwitchPatchDto) SwitchPatch(org.openkilda.messaging.model.SwitchPatch) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 SwitchPatch (org.openkilda.messaging.model.SwitchPatch)1 SwitchLocationDtoV2 (org.openkilda.northbound.dto.v2.switches.SwitchLocationDtoV2)1 SwitchPatchDto (org.openkilda.northbound.dto.v2.switches.SwitchPatchDto)1