Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 package org.ros.internal.transport;
00018
00019 import static org.junit.Assert.assertEquals;
00020
00021 import org.jboss.netty.buffer.ChannelBuffer;
00022 import org.junit.Test;
00023
00027 public class ConnectionHeaderTest {
00028
00029 @Test
00030 public void testEncodeAndDecode() {
00031 ConnectionHeader connectionHeader = new ConnectionHeader();
00032 connectionHeader.addField("foo", "bar");
00033 connectionHeader.addField("bloop", "");
00034 ChannelBuffer encoded = connectionHeader.encode();
00035 assertEquals(connectionHeader, ConnectionHeader.decode(encoded));
00036 }
00037 }