Package org.alfresco.rest.core.assertion
Class ModelAssertion<T>
java.lang.Object
org.alfresco.rest.core.assertion.ModelAssertion<T>
Assertion on Rest Model
Just pass your rest model as constructor
- Author:
- Paul Brodner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassDSL assertion on Rest Model fieldsstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckFieldIsPresent(Object fieldNameToBeRetuned, Object fieldValueToBeRetuned) Use this DSL for asserting particular fields of your model if your model is like this (basic POJO) public class Person extends ModelAssertion{ private String id = "1234"; you can use assert the id of this person as: Person p = new Person(); p.assertField("id").is("1234")
-
Constructor Details
-
ModelAssertion
-
-
Method Details
-
checkFieldIsPresent
-
field
Use this DSL for asserting particular fields of your model if your model is like this (basic POJO) public class Person extends ModelAssertion{ private String id = "1234"; you can use assert the id of this person as: Person p = new Person(); p.assertField("id").is("1234") - Parameters:
fieldName-- Returns:
- Throws:
IllegalStateException- If the field cannot be converted to JSON.
-
fieldsCount
-