Namespace: Consultingwerk.Assertion
Class 
Assert Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:Assert
Purpose:Provides generic methods for validation of ABL primitive values
Description:Routines in this class typically raise an error condition
when the condition is not met.
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Fri Apr 27 23:31:14 CEST 2012



Top Method Summary
Options Name Purpose
+ Equals (character, character) Validates that two character values are equal
+ Equals (date, date) Validates that two decimal values are equal
+ Equals (decimal, decimal) Validates that two decimal values are equal
+ Equals (handle, handle) Validates that handles are equal
+ Equals (int64, int64) Validates that two integer values are equal
+ Equals (logical, logical) Validates that two logical values are equal
+ Equals (longchar, longchar) Validates that two longchar values are equal
+ EqualsCaseSensitive (character, character) Validates that two character values are equal based on a raw compare
+ EqualsCaseSensitive (longchar, longchar) Validates that two longchar values are equal based on a raw compare
+ EqualsFalse (logical) Validates that a LOGICAL Value is FALSE
+ EqualsRaw (character, character) Validates that two character values are equal based on a raw compare
+ EqualsRaw (longchar, longchar) Validates that two longchar values are equal based on a raw compare
+ EqualsTrue (logical) Validates that a LOGICAL Value is TRUE
+ Fail (character) Fails unconditionally
+ GE (decimal, decimal) Validates that the first value is GE the second value
+ GE (int64, int64) Validates that the first value is GE the second value
+ GE (integer, integer) Validates that the first value is GE the second value
+ GreaterThanZero (integer) Validates an ABL Integer value so that it is greater than 0
+ GreaterThanZero (integer, character) Validates an ABL Integer value so that it is greater than 0
+ GT (decimal, decimal) Validates that the first value is GT the second value
+ GT (int64, int64) Validates that the first value is GT the second value
+ GT (integer, integer) Validates that the first value is GT the second value
+ LE (decimal, decimal) Validates that the first value is LE the second value
+ LE (int64, int64) Validates that the first value is LE the second value
+ LE (integer, integer) Validates that the first value is LE the second value
+ LT (decimal, decimal) Validates that the first value is LT the second value
+ LT (int64, int64) Validates that the first value is GT the second value
+ LT (integer, integer) Validates that the first value is LT the second value
+ NotNull (date) Validates an ABL Logical value so that it is not ?
+ NotNull (datetime) Validates an ABL Logical value so that it is not ?
+ NotNull (datetime-tz) Validates an ABL Logical value so that it is not ?
+ NotNull (logical) Validates an ABL Logical value so that it is not ?
+ NotNullOrEmpty (character) Validates an ABL Charcater value so that it is not ? or Empty
+ NotNullOrEmpty (character, character) Validates an ABL Charcater value so that it is not ? or Empty
+ NotNullOrEmpty (longchar) Validates an ABL LONGCHAR value so that it is not ? or Empty
+ NotNullOrEmpty (longchar, character) Validates an ABL LONGCHAR value so that it is not ? or Empty
+ NotNullOrZero (integer) Validates an ABL Integer value so that it is not ? or 0
+ NotNullOrZero (integer, character) Validates an ABL Integer value so that it is not ? or 0

Top Constructor Summary
Options Name Purpose
- Assert () Disallow instance creation


Method Detail
Top

PUBLIC Equals (character, character)

Purpose: Validates that two character values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pcValue1 CHARACTER
The first value to compare
pcValue2 CHARACTER
The second value to compare
Top

PUBLIC Equals (date, date)

Purpose: Validates that two decimal values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdtValue1 DATE
The first value to compare
pdtValue2 DATE
The second value to compare
Top

PUBLIC Equals (decimal, decimal)

Purpose: Validates that two decimal values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdeValue1 DECIMAL
The first value to compare
pdeValue2 DECIMAL
The second value to compare
Top

PUBLIC Equals (handle, handle)

Purpose: Validates that handles are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
phValue1 HANDLE
The first value to compare
phValue2 HANDLE
The second value to compare
Top

PUBLIC Equals (int64, int64)

Purpose: Validates that two integer values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INT64
The first value to compare
piValue2 INT64
The second value to compare
Top

PUBLIC Equals (logical, logical)

Purpose: Validates that two logical values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plValue1 LOGICAL
The first value to compare
plValue2 LOGICAL
The second value to compare
Top

PUBLIC Equals (longchar, longchar)

Purpose: Validates that two longchar values are equal
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plcValue1 LONGCHAR
The first value to compare
plcValue2 LONGCHAR
The second value to compare
Top

PUBLIC EqualsCaseSensitive (character, character)

Purpose: Validates that two character values are equal based on a raw compare
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pcValue1 CHARACTER
The first value to compare
pcValue2 CHARACTER
The second value to compare
Top

PUBLIC EqualsCaseSensitive (longchar, longchar)

Purpose: Validates that two longchar values are equal based on a raw compare
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plcValue1 LONGCHAR
The first value to compare
plcValue2 LONGCHAR
The second value to compare
Top

PUBLIC EqualsFalse (logical)

Purpose: Validates that a LOGICAL Value is FALSE
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plValue LOGICAL
The logical value to validate
Top

PUBLIC EqualsRaw (character, character)

Purpose: Validates that two character values are equal based on a raw compare
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pcValue1 CHARACTER
The first value to compare
pcValue2 CHARACTER
The second value to compare
Top

PUBLIC EqualsRaw (longchar, longchar)

Purpose: Validates that two longchar values are equal based on a raw compare
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plcValue1 LONGCHAR
The first value to compare
plcValue2 LONGCHAR
The second value to compare
Top

PUBLIC EqualsTrue (logical)

Purpose: Validates that a LOGICAL Value is TRUE
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
plValue LOGICAL
The logical value to validate
Top

PUBLIC Fail (character)

Purpose: Fails unconditionally
Notes: Useful Assertion method when reaching a certain code location is
unexpected
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pcMessage CHARACTER
The error message to throw
Top

PUBLIC GE (decimal, decimal)

Purpose: Validates that the first value is GE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdeValue1 DECIMAL
The first value to compare
pdeValue2 DECIMAL
The second value to compare
Top

PUBLIC GE (int64, int64)

Purpose: Validates that the first value is GE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INT64
The first value to compare
piValue2 INT64
The second value to compare
Top

PUBLIC GE (integer, integer)

Purpose: Validates that the first value is GE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INTEGER
The first value to compare
piValue2 INTEGER
The second value to compare
Top

PUBLIC GreaterThanZero (integer)

Purpose: Validates an ABL Integer value so that it is greater than 0
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
piValue INTEGER
The Integer value to validate
Top

PUBLIC GreaterThanZero (integer, character)

Purpose: Validates an ABL Integer value so that it is greater than 0
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
piValue INTEGER
The Integer value to validate
pcValueDesc CHARACTER
The optional description of the value used in the InvalidValueException
Top

PUBLIC GT (decimal, decimal)

Purpose: Validates that the first value is GT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdeValue1 DECIMAL
The first value to compare
pdeValue2 DECIMAL
The second value to compare
Top

PUBLIC GT (int64, int64)

Purpose: Validates that the first value is GT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INT64
The first value to compare
piValue2 INT64
The second value to compare
Top

PUBLIC GT (integer, integer)

Purpose: Validates that the first value is GT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INTEGER
The first value to compare
piValue2 INTEGER
The second value to compare
Top

PUBLIC LE (decimal, decimal)

Purpose: Validates that the first value is LE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdeValue1 DECIMAL
The first value to compare
pdeValue2 DECIMAL
The second value to compare
Top

PUBLIC LE (int64, int64)

Purpose: Validates that the first value is LE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INT64
The first value to compare
piValue2 INT64
The second value to compare
Top

PUBLIC LE (integer, integer)

Purpose: Validates that the first value is LE the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INTEGER
The first value to compare
piValue2 INTEGER
The second value to compare
Top

PUBLIC LT (decimal, decimal)

Purpose: Validates that the first value is LT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
pdeValue1 DECIMAL
The first value to compare
pdeValue2 DECIMAL
The second value to compare
Top

PUBLIC LT (int64, int64)

Purpose: Validates that the first value is GT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INT64
The first value to compare
piValue2 INT64
The second value to compare
Top

PUBLIC LT (integer, integer)

Purpose: Validates that the first value is LT the second value
Notes:
Throws: Consultingwerk.Assertion.AssertException

Parameters:
piValue1 INTEGER
The first value to compare
piValue2 INTEGER
The second value to compare
Top

PUBLIC NotNull (date)

Purpose: Validates an ABL Logical value so that it is not ?
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
pdtValue DATE
The Date value to validate
Top

PUBLIC NotNull (datetime)

Purpose: Validates an ABL Logical value so that it is not ?
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
pdtValue DATETIME
The DateTime value to validate
Top

PUBLIC NotNull (datetime-tz)

Purpose: Validates an ABL Logical value so that it is not ?
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
pdtValue DATETIME-TZ
The DateTime-Tz value to validate
Top

PUBLIC NotNull (logical)

Purpose: Validates an ABL Logical value so that it is not ?
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
plValue LOGICAL
The Logical value to validate
Top

PUBLIC NotNullOrEmpty (character)

Purpose: Validates an ABL Charcater value so that it is not ? or Empty
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
pcValue CHARACTER
The Character value to validate
Top

PUBLIC NotNullOrEmpty (character, character)

Purpose: Validates an ABL Charcater value so that it is not ? or Empty
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
pcValue CHARACTER
The Character value to validate
pcValueDesc CHARACTER
The optional description of the value used in the InvalidValueException
Top

PUBLIC NotNullOrEmpty (longchar)

Purpose: Validates an ABL LONGCHAR value so that it is not ? or Empty
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
plcValue LONGCHAR
The Character value to validate
Top

PUBLIC NotNullOrEmpty (longchar, character)

Purpose: Validates an ABL LONGCHAR value so that it is not ? or Empty
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
plcValue LONGCHAR
The Character value to validate
pcValueDesc CHARACTER
The optional description of the value used in the InvalidValueException
Top

PUBLIC NotNullOrZero (integer)

Purpose: Validates an ABL Integer value so that it is not ? or 0
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
piValue INTEGER
The Integer value to validate
Top

PUBLIC NotNullOrZero (integer, character)

Purpose: Validates an ABL Integer value so that it is not ? or 0
Notes:
Throws: Consultingwerk.Exceptions.InvalidValueException

Parameters:
piValue INTEGER
The Integer value to validate
pcValueDesc CHARACTER
The optional description of the value used in the InvalidValueException


Constructor Detail
Top

PRIVATE Assert ()

Purpose: Disallow instance creation
Notes:



©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:25:37