Class Assert

java.lang.Object
ortus.boxlang.runtime.operators.Assert
All Implemented Interfaces:
IOperator

public class Assert extends Object implements IOperator
Performs an assertion check on an incoming expression value. It returns true if it passes the assertion, else it throws an AssertionError assert "hello" contains "he", asssert expression
  • Constructor Details

    • Assert

      public Assert()
  • Method Details

    • invoke

      public static Boolean invoke(IBoxContext context, Object result) throws AssertionError
      Parameters:
      result - The result of the boolean expression
      Returns:
      true if the boolean result is true, else an exception
      Throws:
      AssertionError - if the result is false or null