Mercurial > hg > Members > sugi > MessagePack-java
diff src/test/java/org/msgpack/annotation/TestOptionalBufferPackUnpack.java @ 0:cb825acd883a
first commit
author | sugi |
---|---|
date | Sat, 18 Oct 2014 15:06:15 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/org/msgpack/annotation/TestOptionalBufferPackUnpack.java Sat Oct 18 15:06:15 2014 +0900 @@ -0,0 +1,74 @@ +package org.msgpack.annotation; + +import java.io.ByteArrayInputStream; + +import org.junit.Test; +import org.msgpack.MessagePack; + + +public class TestOptionalBufferPackUnpack { + + @org.junit.Ignore + public static class TestMessagePack extends TestSetOptional { + public void testOptional0101() throws Exception { + super.testOptional0101(); + } + + public MyMessage01 testOptional0101(MyMessage01 src) throws Exception { + MessagePack msgpack = new MessagePack(); + byte[] bytes = msgpack.write(src); + ByteArrayInputStream in = new ByteArrayInputStream(bytes); + return msgpack.read(in, MyMessage01.class); + } + + public void testOptional0102() throws Exception { + super.testOptional0102(); + } + + public MyMessage02 testOptional0102(MyMessage01 src) throws Exception { + MessagePack msgpack = new MessagePack(); + byte[] bytes = msgpack.write(src); + ByteArrayInputStream in = new ByteArrayInputStream(bytes); + return msgpack.read(in, MyMessage02.class); + } + + public void testOptional0103() throws Exception { + super.testOptional0103(); + } + + public MyMessage03 testOptional0103(MyMessage01 src) throws Exception { + MessagePack msgpack = new MessagePack(); + byte[] bytes = msgpack.write(src); + ByteArrayInputStream in = new ByteArrayInputStream(bytes); + return msgpack.read(in, MyMessage03.class); + } + + public void testOptional0203() throws Exception { + super.testOptional0203(); + } + + public MyMessage03 testOptional0202(MyMessage02 src) throws Exception { + MessagePack msgpack = new MessagePack(); + byte[] bytes = msgpack.write(src); + ByteArrayInputStream in = new ByteArrayInputStream(bytes); + return msgpack.read(in, MyMessage03.class); + } + } + + @Test + public void test0101() throws Exception { + new TestMessagePack().testOptional0101(); + } + @Test + public void test0102() throws Exception { + new TestMessagePack().testOptional0102(); + } + @Test + public void test0103() throws Exception { + new TestMessagePack().testOptional0103(); + } + @Test + public void test0203() throws Exception { + new TestMessagePack().testOptional0203(); + } +}