Package com.syntifi.near.api.service
Class BaseNearServiceTest
- java.lang.Object
-
- com.syntifi.near.api.service.BaseNearServiceTest
-
- Direct Known Subclasses:
NearServiceTest
public abstract class BaseNearServiceTest extends java.lang.Object
Basic support functionality for test case classes- Since:
- 0.0.1
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
-
Constructor Summary
Constructors Constructor Description BaseNearServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getPrettyJson(java.lang.Object jsonObject)
Prettifies json for assertion consistencyprotected java.lang.String
getPrettyJson(java.lang.String json)
Prettifies json for assertion consistencyprotected java.lang.String
loadJsonFromFile(java.lang.String filename)
Loads test json from resources
-
-
-
Method Detail
-
loadJsonFromFile
protected java.lang.String loadJsonFromFile(java.lang.String filename) throws java.io.IOException
Loads test json from resources- Parameters:
filename
-- Returns:
- Throws:
java.io.IOException
-
getPrettyJson
protected java.lang.String getPrettyJson(java.lang.String json) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException
Prettifies json for assertion consistency- Parameters:
json
- json string to prettify- Returns:
- prettified json
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.core.JsonProcessingException
-
getPrettyJson
protected java.lang.String getPrettyJson(java.lang.Object jsonObject) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException
Prettifies json for assertion consistency- Parameters:
jsonObject
- object to serialize and prettify- Returns:
- prettified json
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.core.JsonProcessingException
-
-