Tuesday, 13 November 2012

Receiving End of Line from FitNesse

FitNesse is an automatic tool based on editing the wiki page in a local web server. It could load a jar file and through a table, it could invoke the methods in a specific class.

One of the possible values, when the data is passed as String, could be a text (String) which contains a set of End of Line. The special part of this End of Line is that it is not the one used by Java ("\n"), it is the one used by HTML:


Just in case when it is a problem, for example, passing json string, it could be skipped by removing it. The follow code could be useful:

    public void setJson(String jsonString) throws JSONException {
        jsonString= jsonString.replace("<br/>", "");
        this.jsonObject = new JSONObject(jsonString);

More about FitNesse:

No comments:

Post a Comment