File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed
hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public void serialize_string_short_map_then_deserialize() throws Exception {
4444 stringShortMap .put ("last" , (short )60 );
4545 stringShort .stringShortMap = stringShortMap ;
4646
47- Hessian2StringShortType deserialize = baseHessionSerialize (stringShort );
47+ Hessian2StringShortType deserialize = baseHessianSerialize (stringShort );
4848 assertTrue (deserialize .stringShortMap != null );
4949 assertTrue (deserialize .stringShortMap .size () == 2 );
5050 assertTrue (deserialize .stringShortMap .get ("last" ) instanceof Short );
@@ -61,7 +61,7 @@ public void serialize_string_byte_map_then_deserialize() throws Exception {
6161 stringByteMap .put ("last" , (byte )60 );
6262 stringShort .stringByteMap = stringByteMap ;
6363
64- Hessian2StringShortType deserialize = baseHessionSerialize (stringShort );
64+ Hessian2StringShortType deserialize = baseHessianSerialize (stringShort );
6565 assertTrue (deserialize .stringByteMap != null );
6666 assertTrue (deserialize .stringByteMap .size () == 2 );
6767 assertTrue (deserialize .stringByteMap .get ("last" ) instanceof Byte );
Original file line number Diff line number Diff line change @@ -34,23 +34,23 @@ public class Hessian2EnumSetTest extends SerializeTestBase {
3434 @ Test
3535 public void singleton () throws Exception {
3636 EnumSet h = EnumSet .of (Type .High );
37- EnumSet set = baseHession2Serialize (h );
37+ EnumSet set = baseHessian2Serialize (h );
3838 assertTrue (Arrays .asList (set .toArray ()).contains (Type .High ));
3939 assertFalse (Arrays .asList (set .toArray ()).contains (Type .Lower ));
4040 }
4141
4242 @ Test
4343 public void set () throws Exception {
4444 EnumSet <Type > types = EnumSet .of (Type .High , Type .Lower );
45- EnumSet set = baseHession2Serialize (types );
45+ EnumSet set = baseHessian2Serialize (types );
4646 assertTrue (set .contains (Type .High ));
4747 assertFalse (set .contains (Type .Normal ));
4848 }
4949
5050 @ Test
5151 public void none () throws Exception {
5252 EnumSet <Type > types = EnumSet .noneOf (Type .class );
53- EnumSet set = baseHession2Serialize (types );
53+ EnumSet set = baseHessian2Serialize (types );
5454 TestCase .assertEquals (set , EnumSet .noneOf (Type .class ));
5555 }
5656}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public void serialize_string_short_map_then_deserialize() throws Exception {
4444 stringShortMap .put ("last" , (short )60 );
4545 stringShort .stringShortMap = stringShortMap ;
4646
47- Hessian2StringShortType deserialize = baseHession2Serialize (stringShort );
47+ Hessian2StringShortType deserialize = baseHessian2Serialize (stringShort );
4848 assertTrue (deserialize .stringShortMap != null );
4949 assertTrue (deserialize .stringShortMap .size () == 2 );
5050 assertTrue (deserialize .stringShortMap .get ("last" ) instanceof Short );
@@ -61,7 +61,7 @@ public void serialize_string_byte_map_then_deserialize() throws Exception {
6161 stringByteMap .put ("last" , (byte )60 );
6262 stringShort .stringByteMap = stringByteMap ;
6363
64- Hessian2StringShortType deserialize = baseHession2Serialize (stringShort );
64+ Hessian2StringShortType deserialize = baseHessian2Serialize (stringShort );
6565 assertTrue (deserialize .stringByteMap != null );
6666 assertTrue (deserialize .stringByteMap .size () == 2 );
6767 assertTrue (deserialize .stringByteMap .get ("last" ) instanceof Byte );
Original file line number Diff line number Diff line change 2525import org .junit .Test ;
2626
2727/**
28- * fix hession serialize bug:
28+ * fix hessian serialize bug:
2929 * the filed of parent class will cover the filed of sub class
3030 *
3131 */
@@ -38,7 +38,7 @@ public void testGetBaseUserName() throws Exception {
3838 baseUser .setUserId (1 );
3939 baseUser .setUserName ("tom" );
4040
41- BaseUser serializedUser = baseHessionSerialize (baseUser );
41+ BaseUser serializedUser = baseHessianSerialize (baseUser );
4242 Assert .assertEquals ("tom" , serializedUser .getUserName ());
4343 }
4444
@@ -49,7 +49,7 @@ public void testGetSubUserName() throws Exception {
4949 subUser .setUserId (1 );
5050 subUser .setUserName ("tom" );
5151
52- SubUser serializedUser = baseHessionSerialize (subUser );
52+ SubUser serializedUser = baseHessianSerialize (subUser );
5353 Assert .assertEquals ("tom" , serializedUser .getUserName ());
5454
5555 }
@@ -60,7 +60,7 @@ public void testGetGrandsonUserName() throws Exception {
6060 grandsonUser .setUserId (1 );
6161 grandsonUser .setUserName ("tom" );
6262
63- GrandsonUser serializedUser = baseHessionSerialize (grandsonUser );
63+ GrandsonUser serializedUser = baseHessianSerialize (grandsonUser );
6464 Assert .assertEquals ("tom" , serializedUser .getUserName ());
6565 }
6666
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public void locale() throws IOException {
3939 }
4040
4141 private void assertLocale (Locale locale ) throws IOException {
42- TestCase .assertEquals (locale , baseHession2Serialize (locale ));
43- TestCase .assertEquals (locale , baseHessionSerialize (locale ));
42+ TestCase .assertEquals (locale , baseHessian2Serialize (locale ));
43+ TestCase .assertEquals (locale , baseHessianSerialize (locale ));
4444 }
4545}
Original file line number Diff line number Diff line change 2626import java .io .IOException ;
2727
2828/**
29- * hession base serialize utils
29+ * hessian base serialize utils
3030 *
3131 */
3232public class SerializeTestBase {
3333 /**
34- * hession serialize util
34+ * hessian serialize util
3535 *
3636 * @param data
3737 * @param <T>
3838 * @return
3939 * @throws IOException
4040 */
41- protected <T > T baseHessionSerialize (T data ) throws IOException {
41+ protected <T > T baseHessianSerialize (T data ) throws IOException {
4242 ByteArrayOutputStream bout = new ByteArrayOutputStream ();
4343 HessianOutput out = new HessianOutput (bout );
4444
@@ -51,14 +51,14 @@ protected <T> T baseHessionSerialize(T data) throws IOException {
5151 }
5252
5353 /**
54- * hession2 serialize util
54+ * hessian2 serialize util
5555 *
5656 * @param data
5757 * @param <T>
5858 * @return
5959 * @throws IOException
6060 */
61- protected <T > T baseHession2Serialize (T data ) throws IOException {
61+ protected <T > T baseHessian2Serialize (T data ) throws IOException {
6262 ByteArrayOutputStream bout = new ByteArrayOutputStream ();
6363 Hessian2Output out = new Hessian2Output (bout );
6464
You can’t perform that action at this time.
0 commit comments