Package com.sun.ts.tests.el.common.util
Class Validator
java.lang.Object
com.sun.ts.tests.el.common.util.Validator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
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
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
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
This method is used to validate an expression that have at least one Short in it.
-
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
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
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
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
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
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
-