Search in sources :

Example 6 with ExperimenterInput

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput in project openflowplugin by opendaylight.

the class SalExperimenterMessageServiceImplTest method testBuildRequest.

@Test
public void testBuildRequest() throws Exception {
    SendExperimenterInput sendExperimenterInput = buildSendExperimenterInput();
    final OfHeader request = salExperimenterMessageService.buildRequest(new Xid(DUMMY_XID_VALUE), sendExperimenterInput);
    assertEquals(DUMMY_XID_VALUE, request.getXid());
    assertTrue(request instanceof ExperimenterInput);
    final ExperimenterInput input = (ExperimenterInput) request;
    assertEquals(43L, input.getExperimenter().getValue().longValue());
    assertEquals(44L, input.getExpType().longValue());
    Mockito.verify(extensionConverter).convert(sendExperimenterInput.getExperimenterMessageOfChoice());
}
Also used : Xid(org.opendaylight.openflowplugin.api.openflow.device.Xid) OfHeader(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader) SendExperimenterInput(org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterInput) ExperimenterInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput) SendExperimenterInput(org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterInput) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 ExperimenterInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput)6 ExperimenterId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId)5 ExperimenterInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInputBuilder)5 ByteBuf (io.netty.buffer.ByteBuf)1 Xid (org.opendaylight.openflowplugin.api.openflow.device.Xid)1 SendExperimenterInput (org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterInput)1 OfHeader (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader)1 ExperimenterDataOfChoice (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice)1