Search in sources :

Example 1 with TopologyDefinition

use of org.openkilda.atdd.staging.model.topology.TopologyDefinition in project open-kilda by telstra.

the class FlowCrudStepsTest method setUp.

@Before
public void setUp() throws IOException {
    MockitoAnnotations.initMocks(this);
    ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
    mapper.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS);
    TopologyDefinition topology = mapper.readValue(getClass().getResourceAsStream("/5-switch-test-topology.yaml"), TopologyDefinition.class);
    when(topologyDefinition.getActiveSwitches()).thenReturn(topology.getActiveSwitches());
}
Also used : TopologyDefinition(org.openkilda.atdd.staging.model.topology.TopologyDefinition) YAMLFactory(com.fasterxml.jackson.dataformat.yaml.YAMLFactory) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Before(org.junit.Before)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 YAMLFactory (com.fasterxml.jackson.dataformat.yaml.YAMLFactory)1 Before (org.junit.Before)1 TopologyDefinition (org.openkilda.atdd.staging.model.topology.TopologyDefinition)1