Package com.alibaba.json.bvt.bug

Source Code of com.alibaba.json.bvt.bug.Bug_for_dubbo

package com.alibaba.json.bvt.bug;

import org.junit.Assert;
import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.test.dubbo.HelloServiceImpl;
import com.alibaba.json.test.dubbo.Tiger;
import com.alibaba.json.test.dubbo.Tigers;


public class Bug_for_dubbo extends TestCase {
    public void test_0 () throws Exception {
        HelloServiceImpl helloService = new HelloServiceImpl();
       
        Tiger tiger = new Tiger();
        tiger.setTigerName("δΈœεŒ—θ™Ž");
        tiger.setTigerSex(true);
        //Tiger tigers = helloService.eatTiger(tiger).getTiger();
       
        Tigers tigers = helloService.eatTiger(tiger);
        Assert.assertNotNull(tigers.getTiger());
       
        String text = JSON.toJSONString(tigers, SerializerFeature.WriteClassName);
       
        System.out.println(text);
        Tigers tigers1 = (Tigers) JSON.parse(text);
        Assert.assertNotNull(tigers1.getTiger());
    }
}
TOP

Related Classes of com.alibaba.json.bvt.bug.Bug_for_dubbo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.