Added more (de)serialization factories + ByteBufUtils methods
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / PortStatusMessageFactoryTest.java
1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
2 \r
3 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;\r
4 \r
5 import io.netty.buffer.ByteBuf;\r
6 \r
7 import org.junit.Test;\r
8 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
9 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;\r
10 \r
11 /**\r
12  * @author timotej.kubas\r
13  * @author michal.polkorab\r
14  */\r
15 public class PortStatusMessageFactoryTest {\r
16 \r
17     /**\r
18      * Testing {@link PortStatusMessageFactory} for correct translation into POJO\r
19      */\r
20     @Test\r
21     public void test(){\r
22         ByteBuf bb = BufferHelper.buildBuffer("01 00 00 00 00 00 00 00");\r
23         \r
24         PortStatusMessage builtByFactory = BufferHelper.decodeV13(PortStatusMessageFactory.getInstance(), bb);\r
25         \r
26         BufferHelper.checkHeaderV13(builtByFactory);\r
27         //Assert.assertEquals("Wrong reason", 0x01, builtByFactory.getReason());\r
28     }\r
29 }\r