Skip to content

Commit

Permalink
improved testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed May 20, 2016
1 parent ed9758d commit be5fc9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/com/alibaba/json/bvt/bug/Bug_for_DiffType.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.alibaba.json.bvt.bug;

import org.junit.Assert;

import com.alibaba.fastjson.JSON;

import junit.framework.TestCase;
Expand All @@ -9,7 +11,9 @@ public void test_for_diff_type() throws Exception {
Model model = new Model();
model.setValue(1001);

JSON.toJSONString(model);
String text = JSON.toJSONString(model);
Model model2 = JSON.parseObject(text, Model.class);
Assert.assertEquals(model.value, model2.value);
}

public static class Model {
Expand Down

0 comments on commit be5fc9a

Please sign in to comment.