verifyLowerThan()

Purpose

Checks that a tested value is strictly lower than a reference value.

Syntax

verifyLowerThan( [<string>,] <reference_value>, <tested_value> )

where:

Description

The corresponding test result is Passed if the <tested_value> is strictly lower than <reference_value>, and Failed if the condition is False.

Compared values may be of any numeric Java type: Boolean, float, double, short, byte, char, int or long. <reference_value> and <tested_value> must be of the same type.

An optional <string> message can be logged and displayed in the test report.

If an exception is thrown in a verifyLowerThan() method, an error is logged and the test continues.

Examples

Short:

short val1 = 21;

short val2 = 20;

verifyLowerThan("verify lower true short", val1,val2);

Byte:

byte valb1 = 21;

byte valb2 = 20;

verifyLowerThan("verify lower true byte", valb1,valb2);

Char:

char valc1 = 21;

char valc2 = 20;

verifyLowerThan("verify lower true char", valc1,valc2);

Int:

int vali1 = 21;

int vali2 = 20;

verifyLowerThan("verify lower true int", vali1,vali2);

Long:

long vall1 = 21;

long vall2 = 20;

verifyLowerThan("verify lower long true", vall1,vall2);

Float:

float valf1 = 21;

float valf2 = 20;

verifyLowerThan("verify lower float true", valf1,valf2);

Double:

double vald1 = 21;

double vald2 = 20;

verifyLowerThan("verify lower double true", vald1,vald2);

 

Related Topics

verifyGreaterThan()verifyGreaterThanEquals()verifyLowerThanEquals()