Search in sources :

Example 1 with Type

use of com.alibaba.com.caucho.hessian.io.beans.Type in project dubbo by alibaba.

the class Hessian2EnumSetTest method set.

@Test
public void set() throws Exception {
    EnumSet<Type> types = EnumSet.of(Type.High, Type.Lower);
    EnumSet set = baseHession2Serialize(types);
    assertTrue(set.contains(Type.High));
    assertFalse(set.contains(Type.Normal));
}
Also used : Type(com.alibaba.com.caucho.hessian.io.beans.Type) EnumSet(java.util.EnumSet) Test(org.junit.Test)

Example 2 with Type

use of com.alibaba.com.caucho.hessian.io.beans.Type in project dubbo by alibaba.

the class Hessian2EnumSetTest method none.

@Test
public void none() throws Exception {
    EnumSet<Type> types = EnumSet.noneOf(Type.class);
    EnumSet set = baseHession2Serialize(types);
    TestCase.assertEquals(set, EnumSet.noneOf(Type.class));
}
Also used : Type(com.alibaba.com.caucho.hessian.io.beans.Type) EnumSet(java.util.EnumSet) Test(org.junit.Test)

Aggregations

Type (com.alibaba.com.caucho.hessian.io.beans.Type)2 EnumSet (java.util.EnumSet)2 Test (org.junit.Test)2