Class ModelAssertion.AssertionVerbs

  • Enclosing class:
    ModelAssertion<T>

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

      Constructors 
      Constructor Description
      AssertionVerbs​(java.lang.Object model, java.lang.Object fieldValue, java.lang.String fieldName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T contains​(java.lang.String value)  
      boolean equals​(java.lang.Object o)  
      T is​(java.lang.Object expected)  
      T isEmpty()
      Check if the supplied field is an empty String, Collection or Map.
      T isGreaterThan​(java.lang.Integer value)
      Assert if predicate value is greater than the field value
      T isLessThan​(java.lang.Integer value)
      Assert if predicate value is less than the field value
      T isNot​(java.lang.Object expected)  
      T isNotEmpty()
      Check if the supplied field is a non-empty String, Collection or Map.
      T isNotNull()  
      T isNull()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssertionVerbs

        public AssertionVerbs​(java.lang.Object model,
                              java.lang.Object fieldValue,
                              java.lang.String fieldName)
    • Method Detail

      • isNot

        public T isNot​(java.lang.Object expected)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • is

        public T is​(java.lang.Object expected)
      • isNotEmpty

        public T isNotEmpty()
        Check if the supplied field is a non-empty String, Collection or Map.
        Throws:
        java.lang.AssertionError - if the field is empty.
        java.lang.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:
        java.lang.AssertionError - if the field is not empty.
        java.lang.UnsupportedOperationException - if the field cannot be checked for emptiness.
      • contains

        public T contains​(java.lang.String value)
      • isGreaterThan

        public T isGreaterThan​(java.lang.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​(java.lang.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