Package com.alibaba.json.bvt.util

Source Code of com.alibaba.json.bvt.util.FieldInfoTest$Entity

package com.alibaba.json.bvt.util;

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

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.util.FieldInfo;

public class FieldInfoTest extends TestCase {
  public void test_null() throws Exception {
    FieldInfo fieldInfo = new FieldInfo("getValue",
        Entity.class.getMethod("getValue"), null);
    Assert.assertEquals(null, fieldInfo.getAnnotation(JSONField.class));
  }

  public static class Entity {
    private int value;

    public int getValue() {
      return value;
    }

    public void setValue(int value) {
      this.value = value;
    }

  }
}
TOP

Related Classes of com.alibaba.json.bvt.util.FieldInfoTest$Entity

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.