Package com.alibaba.fastjson.serializer

Examples of com.alibaba.fastjson.serializer.JSONSerializerMap


@SuppressWarnings("deprecation")
public class JSONSerializerMapTest extends TestCase {

    public void test_0() throws Exception {
        JSONSerializerMap map = new JSONSerializerMap();

        Assert.assertFalse(0 == map.size());
        Assert.assertEquals(true, map.get(Integer.class) == IntegerSerializer.instance);

        Assert.assertEquals(true, map.put(Integer.class, IntegerSerializer.instance));
        Assert.assertEquals(true, map.put(Integer.class, IntegerSerializer.instance));
        Assert.assertEquals(true, map.put(Integer.class, IntegerSerializer.instance));

        Assert.assertEquals(true, map.get(Integer.class) == IntegerSerializer.instance);

        Assert.assertFalse(0 == map.size());
    }
View Full Code Here


@SuppressWarnings("deprecation")
public class JSONSerializerMapTest extends TestCase {

    public void test_0() throws Exception {
        JSONSerializerMap map = new JSONSerializerMap();

        Assert.assertFalse(0 == map.size());
        Assert.assertEquals(true, map.get(Integer.class) == IntegerCodec.instance);

        Assert.assertEquals(true, map.put(Integer.class, IntegerCodec.instance));
        Assert.assertEquals(true, map.put(Integer.class, IntegerCodec.instance));
        Assert.assertEquals(true, map.put(Integer.class, IntegerCodec.instance));

        Assert.assertEquals(true, map.get(Integer.class) == IntegerCodec.instance);

        Assert.assertFalse(0 == map.size());
    }
View Full Code Here

@SuppressWarnings("deprecation")
public class JSONSerializerDeprecatedTest extends TestCase {

    public void test_() throws Exception {
        JSONSerializer ser = new JSONSerializer(new JSONSerializerMap());
       
        ser.setDateFormat(new ISO8601DateFormat());
        Assert.assertEquals(null, ser.getDateFormatPattern());
       
        ser.close();
View Full Code Here

TOP

Related Classes of com.alibaba.fastjson.serializer.JSONSerializerMap

Copyright © 2018 www.massapicom. 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.