use of org.openkilda.northbound.dto.v1.switches.SwitchPropertiesDto in project open-kilda by telstra.
the class SwitchMapperTest method testSwitchPropertiesDto.
@Test
public void testSwitchPropertiesDto() {
SwitchPropertiesDto properties = new SwitchPropertiesDto();
properties.setMultiTable(true);
properties.setSwitchArp(true);
properties.setSwitchLldp(true);
properties.setServer42FlowRtt(true);
properties.setServer42Port(42);
properties.setServer42MacAddress("42:42:42:42:42:42");
properties.setSupportedTransitEncapsulation(newArrayList(FlowEncapsulationType.TRANSIT_VLAN.toString().toLowerCase()));
org.openkilda.messaging.model.SwitchPropertiesDto messagingProperties = switchMapper.map(properties);
SwitchPropertiesDto apiProperties = switchMapper.map(messagingProperties);
assertEquals(properties, apiProperties);
}
use of org.openkilda.northbound.dto.v1.switches.SwitchPropertiesDto in project open-kilda by telstra.
the class SwitchMapperTest method testNullServer42SwitchProperties.
@Test
public void testNullServer42SwitchProperties() {
SwitchPropertiesDto properties = new SwitchPropertiesDto();
properties.setServer42FlowRtt(false);
properties.setServer42Port(null);
properties.setServer42MacAddress(null);
properties.setSupportedTransitEncapsulation(newArrayList(FlowEncapsulationType.TRANSIT_VLAN.toString().toLowerCase()));
org.openkilda.messaging.model.SwitchPropertiesDto messagingProperties = switchMapper.map(properties);
SwitchPropertiesDto apiProperties = switchMapper.map(messagingProperties);
assertEquals(properties, apiProperties);
}
Aggregations