verifyGreaterThan()

Purpose

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

Syntax

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

where:

Description

The corresponding test result is Passed if the <tested_value> is strictly greater 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 verifyGreaterThan() method, an error is logged and the test continues.

Examples

Char:

char valc1 = 10;

char valc2 = 20;

verifyGreaterThan("verify greater char true", valc1,valc2);

Byte:

byte valb1 = 10;

byte valb2 = 20;

verifyGreaterThan("verify greater byte true", valb1,valb2);

Short:

short val1 = 10;

short val2 = 20;

verifyGreaterThan("verify greater short true", val1,val2);

Int:

int vali1 = 10;

int vali2 = 20;

verifyGreaterThan("verify greater int true", vali1,vali2);

Long:

long vall1 = 10;

long vall2 = 20;

verifyGreaterThan("verify greater long true", vall1,vall2);

Float:

float valf1 = 10;

float valf2 = 20;

verifyGreaterThan("verify greater float true", valf1,valf2);

Double:

double vald1 = 10;

double vald2 = 20;

verifyGreaterThan("verify greater double true", vald1,vald2);

Related Topic

verifyGreaterThanEquals()verifyLowerThan()verifyLowerThanEquals()