Mercurial > hg > Members > sugi > MessagePack-java
comparison src/test/java/org/msgpack/annotation/TestOptionalBufferPackBufferUnpack.java @ 0:cb825acd883a
first commit
author | sugi |
---|---|
date | Sat, 18 Oct 2014 15:06:15 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cb825acd883a |
---|---|
1 package org.msgpack.annotation; | |
2 | |
3 import java.io.ByteArrayOutputStream; | |
4 | |
5 import org.junit.Test; | |
6 import org.msgpack.MessagePack; | |
7 | |
8 | |
9 public class TestOptionalBufferPackBufferUnpack { | |
10 | |
11 @org.junit.Ignore | |
12 public static class TestMessagePack extends TestSetOptional { | |
13 public void testOptional0101() throws Exception { | |
14 super.testOptional0101(); | |
15 } | |
16 | |
17 public MyMessage01 testOptional0101(MyMessage01 src) throws Exception { | |
18 MessagePack msgpack = new MessagePack(); | |
19 ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
20 msgpack.write(out, src); | |
21 byte[] bytes = out.toByteArray(); | |
22 return msgpack.read(bytes, MyMessage01.class); | |
23 } | |
24 | |
25 public void testOptional0102() throws Exception { | |
26 super.testOptional0102(); | |
27 } | |
28 | |
29 public MyMessage02 testOptional0102(MyMessage01 src) throws Exception { | |
30 MessagePack msgpack = new MessagePack(); | |
31 ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
32 msgpack.write(out, src); | |
33 byte[] bytes = out.toByteArray(); | |
34 return msgpack.read(bytes, MyMessage02.class); | |
35 } | |
36 | |
37 public void testOptional0103() throws Exception { | |
38 super.testOptional0103(); | |
39 } | |
40 | |
41 public MyMessage03 testOptional0103(MyMessage01 src) throws Exception { | |
42 MessagePack msgpack = new MessagePack(); | |
43 ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
44 msgpack.write(out, src); | |
45 byte[] bytes = out.toByteArray(); | |
46 return msgpack.read(bytes, MyMessage03.class); | |
47 } | |
48 | |
49 public void testOptional0203() throws Exception { | |
50 super.testOptional0203(); | |
51 } | |
52 | |
53 public MyMessage03 testOptional0202(MyMessage02 src) throws Exception { | |
54 MessagePack msgpack = new MessagePack(); | |
55 ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
56 msgpack.write(out, src); | |
57 byte[] bytes = out.toByteArray(); | |
58 return msgpack.read(bytes, MyMessage03.class); | |
59 } | |
60 } | |
61 | |
62 @Test | |
63 public void test0101() throws Exception { | |
64 new TestMessagePack().testOptional0101(); | |
65 } | |
66 @Test | |
67 public void test0102() throws Exception { | |
68 new TestMessagePack().testOptional0102(); | |
69 } | |
70 @Test | |
71 public void test0103() throws Exception { | |
72 new TestMessagePack().testOptional0103(); | |
73 } | |
74 @Test | |
75 public void test0203() throws Exception { | |
76 new TestMessagePack().testOptional0203(); | |
77 } | |
78 } |