diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian1StringShortTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian1StringShortTest.java index dfacf345b2d..c3ead159a3d 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian1StringShortTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian1StringShortTest.java @@ -44,7 +44,7 @@ public void serialize_string_short_map_then_deserialize() throws Exception { stringShortMap.put("last", (short)60); stringShort.stringShortMap = stringShortMap; - Hessian2StringShortType deserialize = baseHessionSerialize(stringShort); + Hessian2StringShortType deserialize = baseHessianSerialize(stringShort); assertTrue(deserialize.stringShortMap != null); assertTrue(deserialize.stringShortMap.size() == 2); assertTrue(deserialize.stringShortMap.get("last") instanceof Short); @@ -61,7 +61,7 @@ public void serialize_string_byte_map_then_deserialize() throws Exception { stringByteMap.put("last", (byte)60); stringShort.stringByteMap = stringByteMap; - Hessian2StringShortType deserialize = baseHessionSerialize(stringShort); + Hessian2StringShortType deserialize = baseHessianSerialize(stringShort); assertTrue(deserialize.stringByteMap != null); assertTrue(deserialize.stringByteMap.size() == 2); assertTrue(deserialize.stringByteMap.get("last") instanceof Byte); diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2EnumSetTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2EnumSetTest.java index 47851f376a5..8550ab7a629 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2EnumSetTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2EnumSetTest.java @@ -34,7 +34,7 @@ public class Hessian2EnumSetTest extends SerializeTestBase { @Test public void singleton() throws Exception { EnumSet h = EnumSet.of(Type.High); - EnumSet set = baseHession2Serialize(h); + EnumSet set = baseHessian2Serialize(h); assertTrue(Arrays.asList(set.toArray()).contains(Type.High)); assertFalse(Arrays.asList(set.toArray()).contains(Type.Lower)); } @@ -42,7 +42,7 @@ public void singleton() throws Exception { @Test public void set() throws Exception { EnumSet types = EnumSet.of(Type.High, Type.Lower); - EnumSet set = baseHession2Serialize(types); + EnumSet set = baseHessian2Serialize(types); assertTrue(set.contains(Type.High)); assertFalse(set.contains(Type.Normal)); } @@ -50,7 +50,7 @@ public void set() throws Exception { @Test public void none() throws Exception { EnumSet types = EnumSet.noneOf(Type.class); - EnumSet set = baseHession2Serialize(types); + EnumSet set = baseHessian2Serialize(types); TestCase.assertEquals(set, EnumSet.noneOf(Type.class)); } } diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2StringShortTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2StringShortTest.java index 69f56c186e0..66a8b803671 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2StringShortTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/Hessian2StringShortTest.java @@ -44,7 +44,7 @@ public void serialize_string_short_map_then_deserialize() throws Exception { stringShortMap.put("last", (short)60); stringShort.stringShortMap = stringShortMap; - Hessian2StringShortType deserialize = baseHession2Serialize(stringShort); + Hessian2StringShortType deserialize = baseHessian2Serialize(stringShort); assertTrue(deserialize.stringShortMap != null); assertTrue(deserialize.stringShortMap.size() == 2); assertTrue(deserialize.stringShortMap.get("last") instanceof Short); @@ -61,7 +61,7 @@ public void serialize_string_byte_map_then_deserialize() throws Exception { stringByteMap.put("last", (byte)60); stringShort.stringByteMap = stringByteMap; - Hessian2StringShortType deserialize = baseHession2Serialize(stringShort); + Hessian2StringShortType deserialize = baseHessian2Serialize(stringShort); assertTrue(deserialize.stringByteMap != null); assertTrue(deserialize.stringByteMap.size() == 2); assertTrue(deserialize.stringByteMap.get("last") instanceof Byte); diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/HessianJavaSerializeTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/HessianJavaSerializeTest.java index f1cf26d49f3..3a50709be0c 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/HessianJavaSerializeTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/HessianJavaSerializeTest.java @@ -25,7 +25,7 @@ import org.junit.Test; /** - * fix hession serialize bug: + * fix hessian serialize bug: * the filed of parent class will cover the filed of sub class * */ @@ -38,7 +38,7 @@ public void testGetBaseUserName() throws Exception { baseUser.setUserId(1); baseUser.setUserName("tom"); - BaseUser serializedUser = baseHessionSerialize(baseUser); + BaseUser serializedUser = baseHessianSerialize(baseUser); Assert.assertEquals("tom", serializedUser.getUserName()); } @@ -49,7 +49,7 @@ public void testGetSubUserName() throws Exception { subUser.setUserId(1); subUser.setUserName("tom"); - SubUser serializedUser = baseHessionSerialize(subUser); + SubUser serializedUser = baseHessianSerialize(subUser); Assert.assertEquals("tom", serializedUser.getUserName()); } @@ -60,7 +60,7 @@ public void testGetGrandsonUserName() throws Exception { grandsonUser.setUserId(1); grandsonUser.setUserName("tom"); - GrandsonUser serializedUser = baseHessionSerialize(grandsonUser); + GrandsonUser serializedUser = baseHessianSerialize(grandsonUser); Assert.assertEquals("tom", serializedUser.getUserName()); } diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java index a345dda5a6a..e7514382a0e 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java @@ -39,7 +39,7 @@ public void locale() throws IOException { } private void assertLocale(Locale locale) throws IOException { - TestCase.assertEquals(locale, baseHession2Serialize(locale)); - TestCase.assertEquals(locale, baseHessionSerialize(locale)); + TestCase.assertEquals(locale, baseHessian2Serialize(locale)); + TestCase.assertEquals(locale, baseHessianSerialize(locale)); } } \ No newline at end of file diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java index 587070f2d5b..45478dc3546 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java @@ -26,19 +26,19 @@ import java.io.IOException; /** - * hession base serialize utils + * hessian base serialize utils * */ public class SerializeTestBase { /** - * hession serialize util + * hessian serialize util * * @param data * @param * @return * @throws IOException */ - protected T baseHessionSerialize(T data) throws IOException { + protected T baseHessianSerialize(T data) throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); HessianOutput out = new HessianOutput(bout); @@ -51,14 +51,14 @@ protected T baseHessionSerialize(T data) throws IOException { } /** - * hession2 serialize util + * hessian2 serialize util * * @param data * @param * @return * @throws IOException */ - protected T baseHession2Serialize(T data) throws IOException { + protected T baseHessian2Serialize(T data) throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); Hessian2Output out = new Hessian2Output(bout);