[jjson] r70 committed - tested replace linebreak with

0 views
Skip to first unread message

jj...@googlecode.com

unread,
Aug 2, 2011, 7:07:09 AM8/2/11
to jjso...@googlegroups.com
Revision: 70
Author: grobmeier
Date: Tue Aug 2 04:01:33 2011
Log: tested replace linebreak with
http://code.google.com/p/jjson/source/detail?r=70

Modified:

/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/JsonResultTest.java

/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/MultilineTestAction.java

=======================================
---
/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/JsonResultTest.java
Mon Aug 1 08:32:52 2011
+++
/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/JsonResultTest.java
Tue Aug 2 04:01:33 2011
@@ -43,6 +43,6 @@
@Test
public void testMultiline() throws Exception {
String executeAction = this.executeAction("/multilinetest");
- Assert.assertEquals("{\"test\":\"mytest\\nagain\"}", executeAction);
+
Assert.assertEquals("{\"test\":\"mytest\\nagain\",\"test2\":\"mytest%0Aagain\"}",
executeAction);
}
}
=======================================
---
/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/MultilineTestAction.java
Mon Aug 1 08:32:52 2011
+++
/trunk/jjson-struts2/src/test/java/de/grobmeier/json/plugins/struts2/MultilineTestAction.java
Tue Aug 2 04:01:33 2011
@@ -27,6 +27,9 @@
@JSON(encodeLinebreaks = true)
private String test = "mytest\nagain";

+ @JSON(replaceLinebreaksWith = "%0A")
+ private String test2 = "mytest\nagain";
+
public String execute(){
return SUCCESS;
}
@@ -37,6 +40,12 @@
public void setTest(String test) {
this.test = test;
}
-
-
-}
+
+ public String getTest2() {
+ return test2;
+ }
+
+ public void setTest2(String test2) {
+ this.test2 = test2;
+ }
+}

Reply all
Reply to author
Forward
0 new messages