Skip to content

Latest commit

 

History

History
executable file
·
27 lines (24 loc) · 4.77 KB

assertion-list.md

File metadata and controls

executable file
·
27 lines (24 loc) · 4.77 KB
KEYWORD DESCRIPTION
anInteger check if $value is an integer. eg: ` - >beforeCreating() - >whenever(assertIts: :anInteger(3)) - >then - >stopAndOutput(1001,'message','its an integer')` @param $value
aString check if $value is a string. eg: ` - >beforeCreating() - >whenever( assertIts: :aString( "Hello")) - >then - >stopAndOutput(1001,'message', 'its a string')` @param $value
aBoolean check if $value is a boolean. eg: ` - >beforeCreating() - > whenever( assertIts : : aBoolean(true)) - > stopAndOutput(1001,'message', 'its a boolean')` @param $value
aFloat check if $value is a float. eg: ` - >beforeCreating() - >whenever(assertIts : :aFloat(3.034)) - >then - >stopAndOutput(1001, 'message', 'its a float')` @param $value
withinRange check if $value is within the rane $min $max. eg: `beforeCreating() - >whenever( assertIts : :withinRange($input_value, 1,4)) - >then - >stopAndOutput(1001, 'message', 'its within range')` @param $value @param $min @ param $max
upperCase check if $value is uppercase eg: ` - >beforeCreating() - >whenever( assertIts: :upperCase("HELLO")) - >then- >stopAndOutput(1001, 'message', 'its upper case')`` @param $value
lowerCase check is $value is lowercase. eg: ` - >beforeCreating() - >whenever(assertIts: :lowerCase("hello")) - >then- >stopAndOutput(1001, 'message', 'its lower case')` @param $value
alphanumeric check if $value is alphanumeric. eg: ` - >beforeCreating() - >whenever(assertIts: :("E23D"))- >stopAndOutput(1001, 'message', 'its alphanumeric')` @param $value
alphabets check if $value are alphabets eg: ` - >beforeCreating() - >whenever(assertIts: :alphabet("abcd")) - >then- >stopAndOutput(1001, 'message', its alphabets')` @param $value
startsWith check if $value starts with $prefix eg: ` - >beforeCreating() - >whenever(assertIts: :startsWith("E23D", "E"))- >then- >stopAndOutput(1001, 'message', 'it starts with an E')` @param $value @param $prefix
endsWith check if $value ends with $suffix eg: ` - >beforeCreating()- >whenever(assertIts : :endsWith ("E23D","D"))- >then - >stopAndOutput(1001,'message', 'it ends with D')` @param $value @param $suffix
matchesRegex check if $value is matched regex eg: ` - >beforeCreating() - >whenever(assertIt: :matchesRegex("[email protected]", "email-regex-goes-here"))- >then - >stopAndOutput(1001,'message', 'it matches the email regex')` @param $value @param $pattern
anEmail check if $value is an email eg: `beforeCreating()- >whenever(assertIts: :email("[email protected]"))- >then- >stopAndOutput(1001, 'message', 'its an email')` @param $value
notEmpty check if $value is not an empty array or empty string eg: ` - >beforeCreating()- >whenever(assertIts: :notEmpty("some text"))- >then ->stopAndOutput(1001, 'message', 'its not empty')` @param $value
contains check if $value contains $subString eg: `beforeCreating() - >whenever(assertIts: :contains( "[email protected]", "edmond")) - >then- >stopAndOutput( 1001, 'message', 'email contains edmond') @param $value @param $substring
equal check if $value equals $value1 eg: ` - >beforeCreating()- >whenever(assertIts : :equal("a", "a"))- >then->stopAndOutput( 1001,'message', 'a is equal to a : )')` @param $value @param $value1
notEqual check if $value is not equal to $value1 eg: `beforeCreating()- >wheneverassertIts: :notEqual("a", "b"))- >then->stopAndOutput(1001, 'message', 'a is not equal to b') @param $value @param $value1
greaterThan check if $value is greater than $value1 eg: ` - >beforeCreating() - >whenever(assertIts: :greaterThan(45, 12))- >then- >stopAndOutput(1001,'message', '45 is greater than 12')` @param $value @param $value1
lessThan check if $value is less than $value1 eg:`- > beforeCreating() - >whenever(assertIts: :lessThan(12, 45))- >stopAndOutput(1001, 'message', '12 is less than 45')` @param $value @param $value1
greaterThanOrEqualTo check if $value is greater than or equal to $value1 eg: `- >beforeCreating whenever(assertIts: :greaterThanOrEqualTo(45, 45))- >then stopAndOutput(1001, 'message', '45 is greater than or equal to 45')` @param $value @param $value1
lessThanOrEqualTo check if $value is less than or equal $value1 `- >beforeCreating() - >whenever(assertIts: :lessThanOrEqualTo (45, 45))- >then- >stopAndOutput(1001, 'message', '45 is less than or equal to 45'0` @param $value @param $value1