Kernel::Test::Role::IsTestCase::Generic::ComparesData

NAME

Kernel::Test::Role::IsTestCase::Generic::ComparesData – role to perform checks of test data.

PUBLIC INTERFACE

has 'DataDiffType'

holds the command-line attribute –data-diff-type to control the output for non-matching nested structures.

Success()

record a positive test result without comparing any data.

    $Self->Success( 'Test description' );

Failure()

record a negative test result without comparing any data.

    $Self->Failure( 'Test description' );

True()

test for a scalar value that evaluates to true.

    my $Success = $Self->True( $Value, 'Test description' );

False()

has the same interface as "True()", but tests for a false value instead.

Is()

compares two scalar values for equality.

    my $Success = $Self->Is(
        $Value,             # test data
        1,                  # expected value
        'Test description',
    );

IsNot()

has the same interface as "Is()", but tests for inequality instead.

IsDeeply()

compares complex data structures for equality.

    my $Success = $Self->IsDeeply(
        \%ResultHash,           # test data
        \%ExpectedHash,         # expected value
        'Test description',     # meaningful description
        \@Exclude,              # optional list of elements to exclude
    );

IsNotDeeply()

has the same interface as "IsDeeply()", but tests for deep inequality instead.

Scroll to Top