Merge "Updated registration of Binding Aware notification listeners."
[controller.git] / third-party / openflowj / src / test / java / org / openflow / protocol / OFTypeTest.java
1 package org.openflow.protocol;
2
3
4 import junit.framework.TestCase;
5
6 import org.junit.Test;
7
8
9 public class OFTypeTest extends TestCase {
10
11     public void testOFTypeCreate() throws Exception {
12         OFType foo = OFType.HELLO;
13         Class<? extends OFMessage> c = foo.toClass();
14         TestCase.assertEquals(c, OFHello.class);
15     }
16
17     @Test
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));
21     }
22 }