Class Validator

java.lang.Object
com.sun.ts.tests.el.common.util.Validator

public class Validator extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    testBigDecimal(BigDecimal testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one BigDecimal in it.
    static void
    testBigInteger(BigInteger testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one BigInteger in it.
    static void
    testBoolean(boolean testValOne, Object testValTwo, Object expectedVal, String operator)
    This method is used to validate an expression that has at least one boolean in it.
    static void
    testByte(Byte testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Byte in it.
    static void
    testDouble(Double testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Double in it.
    static void
    testExpression(jakarta.el.ELProcessor elp, String expr, Object expected, String testName)
     
    static void
    testFloat(Float testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Float in it.
    static void
    testInteger(Integer testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Integer in it.
    static void
    testLong(Long testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Long in it.
    static void
    testNumericString(String testVal, Double expectedVal, String operator)
    This method is used to validate an expression that have at least one NumericString in it (numeric String containing ".", "e", or "E".
    static void
    testShort(Short testVal, Object expectedVal, String operator)
    This method is used to validate an expression that have at least one Short in it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Validator

      protected Validator()
  • Method Details

    • testBigDecimal

      public static void testBigDecimal(BigDecimal testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one BigDecimal in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the NumberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testFloat

      public static void testFloat(Float testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Float in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the NumberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testDouble

      public static void testDouble(Double testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Double in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the NumberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testNumericString

      public static void testNumericString(String testVal, Double expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one NumericString in it (numeric String containing ".", "e", or "E". We pass in one of the operands(testVal), the other operand is automatically picked up from the NumberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testBigInteger

      public static void testBigInteger(BigInteger testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one BigInteger in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the numberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testLong

      public static void testLong(Long testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Long in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the numberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testInteger

      public static void testInteger(Integer testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Integer in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the numberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testShort

      public static void testShort(Short testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Short in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the numberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testByte

      public static void testByte(Byte testVal, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that have at least one Byte in it. We pass in one of the operands(testVal), the other operand is automatically picked up from the numberList.
      Parameters:
      testVal - - One of the operands used in the expression.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testBoolean

      public static void testBoolean(boolean testValOne, Object testValTwo, Object expectedVal, String operator) throws Exception
      This method is used to validate an expression that has at least one boolean in it.
      Parameters:
      testValOne - - The boolean operand.
      testValTwo - - The second operand that will be coerced to a boolean.
      expectedVal - - The expected value returned from the Expression evaluation.
      operator - - The operator in which the operands are compared. (i.e. "+", "-", etc...)
      Throws:
      Exception
    • testExpression

      public static void testExpression(jakarta.el.ELProcessor elp, String expr, Object expected, String testName) throws Exception
      Throws:
      Exception