Class ZCL_ABAP_SENCHA

public abstract create protected for testing

Documentation

ABAP Sencha

Types

Visibility and Level Name Documentation
public abap_name TYPE c LENGTH 30  

Attributes

Visibility and Level Name Documentation
protected instance be type ref to ZCL_ABAP_SENCHA

Language chain

protected instance been type ref to ZCL_ABAP_SENCHA

Language chain

protected instance does type ref to ZCL_ABAP_SENCHA

Language chain

protected instance has type ref to ZCL_ABAP_SENCHA

Language chain

protected instance have type ref to ZCL_ABAP_SENCHA

Language chain

protected instance is type ref to ZCL_ABAP_SENCHA

Language chain

protected instance should type ref to ZCL_ABAP_SENCHA

'should' style chain

protected instance that type ref to ZCL_ABAP_SENCHA

Language chain

protected instance to type ref to ZCL_ABAP_SENCHA

Language chain

Methods

Visibility and Level Name Documentation
public instance constructor

Constructor

Initializes language chains.
protected instance
and
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Used for chained checks

expect( value-val1 )->equals( 'a' )->and( value-val2 )->equals( 'b' ).

Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
assert
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checks using chai.js "assert" style

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.

Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
assert_return_code
importing return_code type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checking a return code

It is the same as assert_subrc, just a different name.

Parameters
return_code

Return code value, default SY-SUBRC

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
assert_subrc
importing subrc type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checking a return code

Parameters
subrc

SY-SUBRC value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
assume
importing condition type ANY
message type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method to check prerequisites

After calling assume, TRUE, FALSE AND SATISFY/SATISFIES can be used to check test prerequisites. See CLA_ABAP_UNIT_ASSERT=>ASSUME_TRUE/FALSE/THAT

Parameters
condition

Condition to check

message

Message

result

The current object instance

protected instance
assume_return_code
importing return_code type SYSUBRC default SY-SUBRC
expected type SYSUBRC
message type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

Check the return code as a test prerequisite

See CL_ABAP_UNIT_ASSERT=>ASSUME_RETURN_CODE

Parameters
return_code

The return code

expected

Expected value

message

Message

result

The current object instance

protected instance
assume_subrc
importing subrc type SYSUBRC default SY-SUBRC
expected type SYSUBRC
message type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

Check the return code as a test prerequisite

Same as ASSUME_RETURN_CODE

See CL_ABAP_UNIT_ASSERT=>ASSUME_RETURN_CODE

Parameters
subrc

The return code

expected

Expected value

message

Message

result

The current object instance

protected instance
between
importing actual type ANY optional
lower type NUMERIC
upper type NUMERIC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Number in range check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

lower

Lower number

upper

Upper number

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
bound
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Bound object check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
configure_call
importing test_double type ref to OBJECT
returning value(result) type ref to IF_ABAP_TESTDOUBLE_CONFIG

A shortcut for cl_abap_testdouble=>configure_call(...)

Parameters
test_double

Test double

result

Test double configuration

protected instance
contained_in
importing actual type ANY optional
value type ANY
upper type NUMERIC optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Is the value contained in

Works with

  • internal tables (uses ASSERT_TABLE_CONTAINS)
  • character values (uses COVER_PATTERN, *value*)
  • numbers (uses BETWEEN)
Parameters
value

An internal table, a character sequence or a number

If used for number in range check, the 'value' is treated as the lower boundary

upper

Upper boundary value for BETWEEN checks

result

The current object instance

protected instance
covers_pattern
importing actual type ANY optional
pattern type ANY
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Pattern matching check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

pattern

Pattern

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
cover_pattern
importing actual type ANY optional
pattern type CSEQUENCE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Pattern matching check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

pattern

Pattern

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
create_test_double
importing name type ABAP_NAME
returning value(result) type ref to OBJECT

A wrapper on cl_abap_testdouble=>create(...)

Parameters
name

Class/interface name

result

Test double

protected instance
describe
importing description type STRING
returning value(result) type ref to ZCL_ABAP_SENCHA

Describes the test

Parameters
description

Test description

result

The current object instance

protected instance
equal
importing actual type ANY optional
expected type ANY
float_tolerance type F optional
ignore_hash_sequence type ABAP_BOOL default ABAP_FALSE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Equality check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

expected

Expected value

float_tolerance

Float value tolerance

ignore_hash_sequence

Ignore sequence in hash tables

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
equals
importing actual type ANY optional
expected type ANY
float_tolerance type F optional
ignore_hash_sequence type ABAP_BOOL default ABAP_FALSE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Equality check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

expected

Expected value

float_tolerance

Float value tolerance

ignore_hash_sequence

Ignore sequence in hash tables

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
equals_to
importing actual type ANY optional
expected type ANY
float_tolerance type F optional
ignore_hash_sequence type ABAP_BOOL default ABAP_FALSE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Equality check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

expected

Expected value

float_tolerance

Float value tolerance

ignore_hash_sequence

Ignore sequence in hash tables

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
equal_to
importing actual type ANY optional
expected type ANY
float_tolerance type F optional
ignore_hash_sequence type ABAP_BOOL default ABAP_FALSE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Equality check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

expected

Expected value

float_tolerance

Float value tolerance

ignore_hash_sequence

Ignore sequence in hash tables

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
expect
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checks using "expect" style

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.

Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
expect_return_code
importing return_code type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checking a return code

It is the same as expect_subrc, just a different name.

Parameters
return_code

Return code value, default SY-SUBRC

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
expect_subrc
importing subrc type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checking a return code

Parameters
subrc

SY-SUBRC value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
fail
importing detail type CSEQUENCE optional
returning value(result) type ref to ZCL_ABAP_SENCHA

Fail the test

Wraps CL_ABAP_UNIT_ASSERT=>FAIL

Parameters
detail

Description

result

The current object instance

protected instance
false
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

False value check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
get_mock_for
importing name type ABAP_NAME
returning value(result) type ref to OBJECT

A wrapper on cl_abap_testdouble=>create(...)

Parameters
name

Class/interface name

result

Test double

protected instance
get_test_double_for
importing name type ABAP_NAME
returning value(result) type ref to OBJECT

A wrapper on cl_abap_testdouble=>create(...)

Parameters
name

Class/interface name

result

Test double

protected instance
given
importing description type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

'given' section marker

Parameters
description

Textual description

result

The current object instance

protected instance
initial
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Initial value check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
it
importing description type STRING
returning value(result) type ref to ZCL_ABAP_SENCHA

Describes the test

Parameters
description

Test description

result

The current object instance

protected instance
length_of
importing actual type ANY optional
length type NUMERIC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Length check

Works with

  • internal tables
  • character values (uses numofchar for character data types, strlen for strings)
  • passed to EQUAL
Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

length

Expected length

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
matches_pattern
importing actual type ANY optional
pattern type ANY
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Pattern matching check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

pattern

Pattern

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
matches_regex
importing actual type ANY optional
regex type CSEQUENCE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Regex matching check

When negated, uses 'contains' built-in function.
Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

regex

Regex

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
match_pattern
importing actual type ANY optional
pattern type ANY
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Pattern matching check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

pattern

Pattern

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
match_regex
importing actual type ANY optional
regex type CSEQUENCE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Regex matching check

When negated, uses 'contains' built-in function.
Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

regex

Regex

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
mock
importing name type ABAP_NAME
returning value(result) type ref to OBJECT

A wrapper on cl_abap_testdouble=>create(...)

Parameters
name

Class/interface name

result

Test double

protected instance
not
returning value(result) type ref to ZCL_ABAP_SENCHA

Negates ONLY the next check

Parameters
result

The current object instance

protected instance
not_bound
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Not bound check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
not_cover_pattern
importing actual type ANY optional
pattern type CSEQUENCE
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Pattern not matching check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

pattern

Pattern

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
not_initial
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Non-initial value check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
one_of
importing actual type ANY optional
table type ANY TABLE
upper type NUMERIC optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Is the value a member of a table

Parameters
table

An internal table

If used for number in range check, the 'value' is treated as the lower boundary

upper

Upper boundary value for BETWEEN checks

result

The current object instance

protected instance
return_code
importing return_code type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for the return code check for "should" style

Parameters
return_code

Return code value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
satisfies
importing actual type ANY optional
actual_as_text type CSEQUENCE optional
constraint type ref to IF_CONSTRAINT
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Check for a custom condition

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

actual_as_text

Description used in the alert message

constraint

Constraint object

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

protected instance
satisfy
importing actual type ANY optional
actual_as_text type CSEQUENCE optional
constraint type ref to IF_CONSTRAINT
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

Check for a custom condition

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

actual_as_text

Description used in the alert message

constraint

Constraint object

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
skip
importing details type CSEQUENCE
returning value(result) type ref to ZCL_ABAP_SENCHA

Skip the test execution

Wraps CL_ABAP_UNIT_ASSERT=>SKIP

Parameters
details

Description

result

The current object instance

protected instance
subrc
importing subrc type SYSUBRC default SY-SUBRC
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for the subrc check with "should" style

Parameters
subrc

SY-SUBRC value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
the
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

A wrapper for "value" method

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.
Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
then
importing description type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

'then' section marker

Parameters
description

Textual description

result

The current object instance

protected instance
true
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

True value check

Parameters
actual

Actual value

If provided here, overwrites the 'actual' value provided in the expect/assert/value/v/the methods

message

Message (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the message provided in the expect/assert/value/v/the methods

level

Severity level (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the level provided in the expect/assert/value/v/the methods

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

If provided here, overwrites the quit provided in the expect/assert/value/v/the methods

result

The current object instance

protected instance
v
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checks using "should" style

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.
Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
value
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checks using "should" style

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.

Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
value_of
importing actual type ANY optional
message type STRING optional
level type INT1 default IF_ABAP_UNIT_CONSTANT=>SEVERITY-MEDIUM
quit type INT1 default IF_ABAP_UNIT_CONSTANT=>QUIT-TEST
returning value(result) type ref to ZCL_ABAP_SENCHA

An entry method for checks using "should" style

This method sets the stage for checking provided values with one of the check methods. The parameters are passed to the respective CL_ABAP_UNIT_ASSERT methods, wrapped by check methods like bound, equals etc.
Parameters
actual

Actual value

message

Message (see CL_ABAP_UNIT_ASSERT)

level

Severity level (see CL_ABAP_UNIT_ASSERT)

quit

Control flow (see CL_ABAP_UNIT_ASSERT)

result

The current object instance

protected instance
verify
importing test_double type ref to OBJECT

A shortcut for cl_abap_testdouble=>verify_expectations(...)

Parameters
test_double

Test double

protected instance
verify_expectations
importing test_double type ref to OBJECT

A shortcut for cl_abap_testdouble=>verify_expectations(...)

Parameters
test_double

Test double

protected instance
when
importing description type STRING optional
returning value(result) type ref to ZCL_ABAP_SENCHA

'when' section marker

Parameters
description

Textual description

result

The current object instance