Class ModelAssertion.AssertionVerbs

java.lang.Object
org.alfresco.rest.core.assertion.ModelAssertion.AssertionVerbs
Enclosing class:
ModelAssertion<T>

public class ModelAssertion.AssertionVerbs extends Object
DSL assertion on Rest Model fields
Author:
Paul Brodner
  • Constructor Details

    • AssertionVerbs

      public AssertionVerbs(Object model, Object fieldValue, String fieldName)
  • Method Details

    • isNot

      public T isNot(Object expected)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • is

      public T is(Object expected)
    • isNotEmpty

      public T isNotEmpty()
      Check if the supplied field is a non-empty String, Collection or Map.
      Throws:
      AssertionError - if the field is empty.
      UnsupportedOperationException - if the field cannot be checked for emptiness.
    • isNotNull

      public T isNotNull()
    • isNull

      public T isNull()
    • isEmpty

      public T isEmpty()
      Check if the supplied field is an empty String, Collection or Map.
      Throws:
      AssertionError - if the field is not empty.
      UnsupportedOperationException - if the field cannot be checked for emptiness.
    • contains

      public T contains(String value)
    • containsOnce

      public T containsOnce(String value)
    • notContains

      public T notContains(String value)
    • isGreaterThan

      public T isGreaterThan(Integer value) throws org.alfresco.utility.exception.TestConfigurationException
      Assert if predicate value is greater than the field value
      Parameters:
      value - the predicate
      Returns:
      Throws:
      org.alfresco.utility.exception.TestConfigurationException
    • isLessThan

      public T isLessThan(Integer value) throws org.alfresco.utility.exception.TestConfigurationException
      Assert if predicate value is less than the field value
      Parameters:
      value - the predicate
      Returns:
      Throws:
      org.alfresco.utility.exception.TestConfigurationException