static build methods to wrap TestData and Jsonify's statics for the json-views. These helpers enable the easy generation of test data in Map form to test methods like the repo's create and update. Note: when using this in unit test the JsonViewSpecSetup should be used to make sure the proper view-tools beans are setup. This is alrady taken care of if using one of the main DataRepoTest or DomainRepoTest traits
Type Params | Return Type | Name and description |
---|---|---|
<T> |
static T |
buildCreate(Map args = [:], Class<T> clazz) buildMap test data and passes to the create() method from the domain repo |
|
static JsonifyResult |
buildJson(Map args = [:], Class entityClass) Uses the build-test-data plugin to first build the entity with data and then converts to with json-views |
|
static Map |
buildMap(Map args = [:], Class entityClass) Just a convienience method to return buildJson().json as Map |
|
static List<String> |
getFieldsToBuild(Class entityClass, Object buildDataIncludes = null, Map data = [:]) |
|
static Map<String, Map> |
parseArgs(Map args) Parse and split the args map into its components for both the TestData and json-views |
buildMap test data and passes to the create() method from the domain repo
Uses the build-test-data plugin to first build the entity with data and then converts to with json-views
args
- see parseArgsJust a convienience method to return buildJson().json as Map
Parse and split the args map into its components for both the TestData and json-views
args
-