![]() |
T4S4
18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
|
Commands to compare expected with actual results. They must only be called from within verify procedures. Call them without any namespace identifier. More...
Functions | |
assertDiffers unExpected actual ?prefix? | |
Assert that two values are not equal. More... | |
assertEQ expected actual ?prefix? | |
Assert that two values are equal. More... | |
assertEquals expected actual ?prefix? | |
Assert that two values are equal. More... | |
assertErrorCode errorCode ?prefix? | |
Assert that the error that was raised in the bad section of the test issues the given error code. More... | |
assertErrorInfo errorInfo ?prefix? | |
Assert that the error that was raised in the bad section of the test issues the given error info. More... | |
assertErrorMessage errorMessage ?prefix? | |
Assert that the error that was raised in the bad section of the test issues the given error message. More... | |
assertErrorRaised ?prefix? | |
Asserts that an error was raised in the bad section of the demo case. More... | |
assertFalse expression ?prefix? | |
Assert that an expression evaluates to false . More... | |
assertNE unExpected actual ?prefix? | |
Assert that two values are not equal. More... | |
assertTextFilesEqual args | |
Assert that the contents of two files are equal assuming they contain text. More... | |
assertTrue expression ?prefix? | |
Assert that an expression evaluates to true . More... | |
Commands to compare expected with actual results. They must only be called from within verify procedures. Call them without any namespace identifier.
T4X::TestingSupport::Assert::assertDiffers | unExpected actual ?prefix? | ||
Assert that two values are not equal.
If they are, an error is raised with errorCode
being {ASSERT DIFFERS}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Comparison is performed using the ==
operator.
unExpected | the value from which the actual value must differ to fulfill the assertion |
actual | the actual value |
prefix | (optional) string prefixing the line added to the test report |
T4X::TestingSupport::Assert::assertEQ | expected actual ?prefix? | ||
Assert that two values are equal.
If they are not, an error is raised with errorCode
being {ASSERT EQUALS}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Comparison is performed using the ne
operator.
expected | the expected value |
actual | the actual value |
prefix | (optional) string prefixing the line added to the test report |
T4X::TestingSupport::Assert::assertEquals | expected actual ?prefix? | ||
Assert that two values are equal.
If they are not, an error is raised with errorCode
being {ASSERT EQUALS}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Comparison is performed using the !=
operator.
expected | the expected value |
actual | the actual value |
prefix | optional string prefixing the line added to the test report |
T4X::TestingSupport::Assert::assertErrorCode | errorCode ?prefix? | ||
Assert that the error that was raised in the bad section of the test issues the given error code.
If not, an error is raised with errorCode
being {ASSERT ERROR_CODE}
.
This command may only be called inside verify sections and the error caught by the testing framework.
errorCode | the expected error code |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Comparison Failure". |
T4X::TestingSupport::Assert::assertErrorInfo | errorInfo ?prefix? | ||
Assert that the error that was raised in the bad
section of the test issues the given error info.
If not, an error is raised with errorCode
being {ASSERT ERROR_INFO}
.
This command may only be called inside verify sections and the error caught by the testing framework.
errorInfo | the expected error info |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Comparison Failure". |
T4X::TestingSupport::Assert::assertErrorMessage | errorMessage ?prefix? | ||
Assert that the error that was raised in the bad
section of the test issues the given error message.
If not, an error is raised with errorCode
being {ASSERT ERROR_MESSAGE}
.
This command may only be called inside verify sections and the error caught by the testing framework.
errorMessage | the expected error message |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Comparison Failure". |
T4X::TestingSupport::Assert::assertErrorRaised | ?prefix? | ||
Asserts that an error was raised in the bad
section of the demo case.
If not, an error is raised with errorCode
being {ASSERT ERROR_RAISED}
.
This command may only be called inside verify sections and the error caught by the testing framework.
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error". |
T4X::TestingSupport::Assert::assertFalse | expression ?prefix? | ||
Assert that an expression evaluates to false
.
If not, an error is raised with errorCode
being {ASSERT FALSE}
.
This command may only be called inside verify sections and the error caught by the testing framework.
expression | to be evaluated |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |
T4X::TestingSupport::Assert::assertNE | unExpected actual ?prefix? | ||
Assert that two values are not equal.
If they are, an error is raised with errorCode
being {ASSERT DIFFERS}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Comparison is performed using the eq
operator.
unExpected | the value from which the actual value must differ to fulfill the assertion |
actual | the actual value |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Comparison Failure". |
T4X::TestingSupport::Assert::assertTextFilesEqual | args | ||
Assert that the contents of two files are equal assuming they contain text.
If they are not, an error is raised with errorCode
being {ASSERT TEXT_FILES_EQUAL}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Comparison is performed by applying the eq
operator to the contents of both files.
The -ignore
option allows to specify regular expressions to be ignore during comparison. This is typically used to mask out generated data that changes with each test run.
expected | the name of the file as it should be |
actual | the name of the file as it actually comes out of the test |
prefix | (optional) string prefixing the line added to the test report |
-ignore | REGEXP (optional) regular expression with at least one parenthesized expression to be ignored when comparing the lines of the files |
T4X::TestingSupport::Assert::assertTrue | expression ?prefix? | ||
Assert that an expression evaluates to true
.
If not, an error is raised with errorCode
being {ASSERT TRUE}
.
This command may only be called inside verify sections and the error caught by the testing framework.
expression | to be evaluated |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |