1 package org.openflow.codec.protocol;
3 import junit.framework.TestCase;
5 import org.openflow.codec.io.DataBuffers;
6 import org.openflow.codec.io.IDataBuffer;
7 import org.openflow.codec.protocol.OFPPortMod;
8 import org.openflow.codec.protocol.OFPType;
9 import org.openflow.codec.util.OFTestCase;
11 public class OFPPortConfigTest extends OFTestCase {
12 public void testWriteRead() throws Exception {
13 OFPPortMod msg = (OFPPortMod) messageFactory.getMessage(OFPType.PORT_MOD);
14 msg.setHardwareAddress(new byte[6]);
16 IDataBuffer bb = DataBuffers.allocate(1024);
21 TestCase.assertEquals(OFPType.PORT_MOD, msg.getType());
22 TestCase.assertEquals(1, msg.getPortNumber());