use of elemental.json.JsonString in project che by eclipse.
the class JsonRpcResultTest method shouldToStringWhenParsingStringWithResultAsASingleString.
@Test
public void shouldToStringWhenParsingStringWithResultAsASingleString() throws Exception {
JsonString string = jsonFactory.create("a");
String expected = string.toJson();
JsonRpcResult jsonRpcResult = new JsonRpcResult(string.toJson(), jsonFactory, dtoFactory);
String actual = jsonRpcResult.toString();
assertEquals(expected, actual);
}
use of elemental.json.JsonString in project che by eclipse.
the class JsonRpcParamsTest method shouldToJsonValueForParsedSingleDtoParams.
@Test
public void shouldToJsonValueForParsedSingleDtoParams() throws Exception {
JsonString expected = jsonFactory.create(DTO_JSON);
JsonRpcParams jsonRpcParams = new JsonRpcParams(DTO_JSON, dtoFactory, jsonFactory);
JsonValue actual = jsonRpcParams.toJsonValue();
assertTrue(expected.jsEquals(actual));
}
use of elemental.json.JsonString in project che by eclipse.
the class JsonRpcResultTest method shouldToJsonValueWhenPassingParametersWithResultAsASingleString.
@Test
public void shouldToJsonValueWhenPassingParametersWithResultAsASingleString() throws Exception {
String value = "a";
JsonString expected = jsonFactory.create("a");
JsonRpcResult jsonRpcResult = new JsonRpcResult(value, dtoFactory, jsonFactory);
JsonValue actual = jsonRpcResult.toJsonValue();
assertTrue(expected.jsEquals(actual));
}
Aggregations