Search in sources :

Example 11 with HelloInputBuilder

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

the class OF10HelloInputMessageFactoryTest method testWithoutElementsSet.

/**
 * Testing of {@link OF10HelloInputMessageFactory} for correct translation from POJO.
 */
@Test
public void testWithoutElementsSet() throws Exception {
    HelloInputBuilder hib = new HelloInputBuilder();
    BufferHelper.setupHeader(hib, EncodeConstants.OF10_VERSION_ID);
    HelloInput hi = hib.build();
    ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
    helloFactory.serialize(hi, out);
    BufferHelper.checkHeaderV10(out, (byte) 0, 8);
}
Also used : HelloInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput) ByteBuf(io.netty.buffer.ByteBuf) HelloInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInputBuilder) Test(org.junit.Test)

Aggregations

HelloInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInputBuilder)11 Test (org.junit.Test)8 ByteBuf (io.netty.buffer.ByteBuf)7 HelloInput (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput)7 Elements (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.hello.Elements)3 SerializerRegistry (org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry)2 ArrayList (java.util.ArrayList)1 UdpMessageListenerWrapper (org.opendaylight.openflowjava.protocol.impl.core.connection.UdpMessageListenerWrapper)1 ElementsBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.hello.ElementsBuilder)1