![]() |
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 | |
assertContains list item ?prefix? | |
Assert that a list contains an item. More... | |
assertContainsNot list item ?prefix? | |
Assert that a list does not contain an item. More... | |
assertDiffers unexpected actual ?prefix? | |
Assert that two values are not equal. More... | |
assertDoneWithin maximumElapsed ?prefix? | |
Assert that the execution finished within the given amount of time. 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... | |
assertNotSubstring string substring ?prefix? | |
Assert that a string does not contain a substring. More... | |
assertSubstring string substring ?prefix? | |
Assert that a string contains a substring. More... | |
assertSucceeded testResultsIn ?prefix? | |
Assert that the delegated execution of a demo suite succeeded. More... | |
assertTextFilesDiffer args | |
Assert that the contents of two files differ assuming they contain text. 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::TNT::Assert::assertContains | list item ?prefix? | ||
Assert that a list contains an item.
If not, an error is raised with errorCode
being {ASSERT CONTAINS}
.
This command may only be called inside verify sections and the error caught by the testing framework.
list | to be searched for the item |
item | to be searched in the list |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |
T4X::TNT::Assert::assertContainsNot | list item ?prefix? | ||
Assert that a list does not contain an item.
If not, an error is raised with errorCode
being {ASSERT CONTAINS_NOT}
.
This command may only be called inside verify sections and the error caught by the testing framework.
list | to be searched for the item |
item | to be searched in the list |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |
T4X::TNT::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::TNT::Assert::assertDoneWithin | maximumElapsed ?prefix? | ||
Assert that the execution finished within the given amount of time.
If not, an error is raised with errorCode
being {ASSERT DONE_WITHIN}
.
This command may only be called inside verify sections and the error caught by the testing framework.
Note that it does not stop execution when the maximum allowed duration exceeds.
maximumElapsed | a floating point number denoting the maximum allowed duration in seconds |
refix | (optional) string prefixing the line added to the test report; Defaults to "Timeout Failure". |
T4X::TNT::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::TNT::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::TNT::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::TNT::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::TNT::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::TNT::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::TNT::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::TNT::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::TNT::Assert::assertNotSubstring | string substring ?prefix? | ||
Assert that a string does not contain a substring.
If not, an error is raised with errorCode
being {ASSERT NOT_SUBSTRING}
.
This command may only be called inside verify sections and the error caught by the testing framework.
string | to be searched for the substring |
substring | to be searched in the string |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |
T4X::TNT::Assert::assertSubstring | string substring ?prefix? | ||
Assert that a string contains a substring.
If not, an error is raised with errorCode
being {ASSERT SUBSTRING}
.
This command may only be called inside verify sections and the error caught by the testing framework.
string | to be searched for the substring |
substring | to be searched in the string |
prefix | (optional) string prefixing the line added to the test report; Defaults to "Assertion Error" |
T4X::TNT::Assert::assertSucceeded | testResultsIn ?prefix? | ||
Assert that the delegated execution of a demo suite succeeded.
If it didn't, an error is raised with errorCode
being {ASSERT SUCCEEDED}
.
This command may only be called inside verify sections and the error caught by the testing framework.
testResultsIn | the name of the Tcl array resulting from the delegated execution |
prefix | optional string prefixing the line added to the test report |
T4X::TNT::Assert::assertTextFilesDiffer | args | ||
Assert that the contents of two files differ assuming they contain text.
If they are equal, an error is raised with errorCode
being {ASSERT TEXT_FILES_DIFFER}
.
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 not 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::TNT::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::TNT::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" |