Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
fixed testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jul 17, 2016
1 parent 5f8c776 commit 00634be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/java/com/alibaba/json/bvt/bug/Issue585.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;

import junit.framework.TestCase;

public class Issue585 extends TestCase {
private String original = JSON.DEFAULT_TYPE_KEY;
private ParserConfig originalConfig = ParserConfig.global;

protected void setUp() throws Exception {
ParserConfig.global = new ParserConfig();
if (!JSON.DEFAULT_TYPE_KEY.equals("mySpace")) {
JSON.setDefaultTypeKey("mySpace");
}
}

protected void tearDown() throws Exception {
JSON.setDefaultTypeKey(original);
ParserConfig.global = originalConfig;
}

public void test_for_issue() throws Exception {
Expand Down

0 comments on commit 00634be

Please sign in to comment.