Package io.ebean.test
Class DbJson.PrettyJson
- java.lang.Object
-
- io.ebean.test.DbJson.PrettyJson
-
- Enclosing class:
- DbJson
public static class DbJson.PrettyJson extends Object
Contains the JSON of beans(s).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasJson()Return the JSON content.voidassertContentMatches(String resourcePath)Assert the json matches the content at the given resource path.DbJson.PrettyJsonreplace(String... propertyNames)Replace the values of the given properties with a placeholder value.DbJson.PrettyJsonwithPlaceholder(String placeHolder)Set the placeHolder to use when replacing property values.
-
-
-
Method Detail
-
withPlaceholder
public DbJson.PrettyJson withPlaceholder(String placeHolder)
Set the placeHolder to use when replacing property values.
-
replace
public DbJson.PrettyJson replace(String... propertyNames)
Replace the values of the given properties with a placeholder value.Typically we do this on generated properties such as id and timestamp properties.
-
assertContentMatches
public void assertContentMatches(String resourcePath)
Assert the json matches the content at the given resource path.DbJson.of(timedEntries) .replace("id", "eventTime") .assertContentMatches("/assertJson/full-1-timed.json");
-
-