1 package org.openflow.protocol;
4 import junit.framework.TestCase;
9 public class OFTypeTest extends TestCase {
11 public void testOFTypeCreate() throws Exception {
12 OFType foo = OFType.HELLO;
13 Class<? extends OFMessage> c = foo.toClass();
14 TestCase.assertEquals(c, OFHello.class);
18 public void testMapping() throws Exception {
19 TestCase.assertEquals(OFType.HELLO, OFType.valueOf((byte) 0));
20 TestCase.assertEquals(OFType.BARRIER_REPLY, OFType.valueOf((byte) 19));