/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @Title: QrCodeUtilTest
 * @Package cn.freemud.utils
 * @Description:二维码生成工具类
 * @author: song.cai
 * @date: 2018/5/16 14:40
 * @version V1.0
 * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
package cn.freemud.utils;


import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class QrCodeUtilTest {

    @Test
    public void qq() {
//        String imageString = QrCodeUtil.createQrCode("1243456", 200, "PNG");
//        System.out.println(imageString);

        aa a1 = new aa();
        List<aa> list = new ArrayList<>();

        for (int i = 0;i<4 ;i++){
            a1.setA("1" + i);
            a1.setB("1"+ i);
            a1.setC("1"+ i);
            list.add(a1);
        }
        String astr = list.toString();

        Gson gson = new Gson();
        List<aa> goods = gson.fromJson(astr,
                new TypeToken<List<aa>>() {
                }.getType());

        System.out.println(goods);

    }


    public class aa {
        String a;
        String b;
        String c;

        public String getA() {
            return a;
        }

        public void setA(String a) {
            this.a = a;
        }

        public String getB() {
            return b;
        }

        public void setB(String b) {
            this.b = b;
        }

        public String getC() {
            return c;
        }

        public void setC(String c) {
            this.c = c;
        }
    }




}