use of org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.AggregateFlowStatistics in project openflowplugin by opendaylight.
the class MultipartReplyTranslatorTest method testTranslateAggregate.
@Test
public void testTranslateAggregate() {
DeviceContext mockedDeviceContext = mock(DeviceContext.class);
MultipartReplyMessage multipartReplyMessage = prepareMocks(mockedDeviceContext, prepareMultipartReplyAggregate(), MultipartType.OFPMPAGGREGATE);
DataContainer result = MultipartReplyTranslatorUtil.translate(multipartReplyMessage, mockedDeviceContext.getDeviceInfo(), CONVERTOR_MANAGER, mockedDeviceContext.oook()).get();
DataContainer dataObject = validateOutput(result);
assertTrue(dataObject instanceof AggregateFlowStatistics);
AggregateFlowStatistics message = (AggregateFlowStatistics) dataObject;
assertEquals(DUMMY_BYTE_COUNT, message.getByteCount().getValue());
assertEquals(DUMMY_PACKET_COUNT, message.getPacketCount().getValue());
assertEquals(DUMMY_FLOW_COUNT, message.getFlowCount().getValue());
}
Aggregations