06ef8b5b8cdaee01ee2bfca1cecc97c40b4a5684
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / GetConfigReplyMessageFactoryTest.java
1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
2 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;\r
3 \r
4 import io.netty.buffer.ByteBuf;\r
5 \r
6 import org.junit.Assert;\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.GetConfigOutput;\r
10 \r
11 /**\r
12  * @author michal.polkorab\r
13  * @author timotej.kubas\r
14  */\r
15 public class GetConfigReplyMessageFactoryTest {\r
16 \r
17 \r
18     /**\r
19      * Testing {@link GetConfigReplyMessageFactory} for correct translation into POJO\r
20      */\r
21     @Test\r
22     public void test() {\r
23         ByteBuf bb = BufferHelper.buildBuffer("00 01 00 03");\r
24         GetConfigOutput builtByFactory = BufferHelper.decodeV13(\r
25                 GetConfigReplyMessageFactory.getInstance(), bb);\r
26 \r
27         BufferHelper.checkHeaderV13(builtByFactory);\r
28         // TODO - enum problem !\r
29 //        Assert.assertEquals(builtByFactory.getFlags().toString(),"OFPCFRAGDROP"); \r
30         Assert.assertEquals("Wrong missSendLen", 0x01, builtByFactory.getMissSendLen().intValue());\r
31         \r
32     }\r
33     \r
34 }\r