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

Commit

Permalink
add testcase for issue 469, #469
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Apr 11, 2016
1 parent b0d326d commit 1eef1ce
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_469.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.alibaba.json.bvt.bug;

import org.junit.Assert;

import com.alibaba.fastjson.JSON;

import junit.framework.TestCase;

public class Bug_for_issue_469 extends TestCase {

public void test_for_issue() throws Exception {
VO vo = new VO();
vo.sPhotoUrl = "xxx";

String text = JSON.toJSONString(vo);
VO vo2 = JSON.parseObject(text, VO.class);
Assert.assertEquals(vo.getsPhotoUrl(), vo2.getsPhotoUrl());
}

public static class VO {

private String sPhotoUrl;

public String getsPhotoUrl() {
return sPhotoUrl;
}

public void setsPhotoUrl(String sPhotoUrl) {
this.sPhotoUrl = sPhotoUrl;
}

}
}

0 comments on commit 1eef1ce

Please sign in to comment.