use of org.openkilda.northbound.dto.v2.switches.SwitchLocationDtoV2 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());
}
Aggregations