16 package org.openkilda.northbound.dto;
18 import static java.util.Collections.singletonList;
19 import static org.junit.Assert.assertEquals;
35 import com.fasterxml.jackson.databind.ObjectMapper;
36 import org.junit.Test;
38 import java.io.IOException;
39 import java.util.Collections;
43 private static final String SWITCH_ID =
"switch-test";
44 private static final String FLOW_ID =
"flow-test";
46 private final ObjectMapper mapper =
new ObjectMapper();
48 private <T> T pass(T entity, Class<T> clazz)
throws IOException {
49 return mapper.readValue(mapper.writeValueAsString(entity), clazz);
62 FLOW_ID,
true, singletonList(0L), singletonList(1L), singletonList(discrepancyDto), 10, 11);
90 assertEquals(dto, pass(dto,
LinkDto.class));
96 assertEquals(dto, pass(dto,
PathDto.class));
115 singletonList(0L), singletonList(1L), singletonList(2L));
122 singletonList(0L), singletonList(1L), singletonList(2L), singletonList(3L));
129 assertEquals(dto, pass(dto,
SwitchDto.class));
void verificationOutputTest()
void deleteMeterResultTest()
void pathDiscrepancyDtoTest()
void rulesSyncResultTest()
void verificationInputTest()
void flowValidationDtoTest()
void uniFlowVerificationOutputTest()
void rulesValidationResultTest()