Java 类com.alibaba.fastjson.parser.deserializer.EnumDeserializer 实例源码

项目:GitHub    文件:EnumParserTest.java   
public void test_error_3() throws Exception {
    Exception error = null;
    try {
        String text = "4";
        DefaultJSONParser parser = new DefaultJSONParser(text);

        new EnumDeserializer(Object.class).deserialze(parser, Object.class, null);
    } catch (Exception ex) {
        error = ex;
    }
    Assert.assertNotNull(error);
}
项目:GitHub    文件:EnumParserTest.java   
public void test_error_4() throws Exception {
    Exception error = null;
    try {
        String text = "true";
        DefaultJSONParser parser = new DefaultJSONParser(text);

        new EnumDeserializer(Object.class).deserialze(parser, Object.class, null);
    } catch (Exception ex) {
        error = ex;
    }
    Assert.assertNotNull(error);
}