IUnicodeStringAssertions
Short summary
the interface provides assert statements for UTF-8 and UTF-16 strings with an undefined length. It accepts anystrings, strings are processed as UTF8 and wstrings are processed as UTF16
Attention: All strings are handled as null terminated byte/word streams. For UTF8 is end of the string 16#00 For UTF-16 is end of the string 16#00_00
Attention:
The interface IUnicodeStringAssertions uses ANY_STRING,
for this it's not possible to use literals/constants,
because for ANY types generates the compiler __SYSTEM.AnyType
and __SYSTEM.AnyType contains a pointer
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| - | No | No | __SYSTEM.IQueryInterface | - |
UML Diagram
Methods
contains
- Parameters:
stringToCheck(ANY_STRING): current string to checksearchString(ANY_STRING): string must be found instringToCheckmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal toonormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck contains the search string…
containsNo
- Parameters:
stringToCheck(ANY_STRING): current string to checksearchString(ANY_STRING): string that must not be found instringToCheckmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal toonormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck not contains the search string…
endsWith
- Parameters:
stringToCheck(ANY_STRING): current string to checkend(ANY_STRING): expected end ofstringToCheckmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal tootrim(BOOL):TRUEmeans truncation of spaces on the right side ofstringToChecknormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck ends with end…
isEmpty
- Parameters:
stringToCheck(ANY_STRING): current string to checkmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is empty…
isEqualTo
- Parameters:
stringToCheck(ANY_STRING): current string to checkexpected(ANY_STRING):stringToCheckmust be equal to expectedmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal toonormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck is equal to expected…
isNotEmpty
- Parameters:
stringToCheck(ANY_STRING): current string to checkmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is not empty…
isNotEqualTo
- Parameters:
stringToCheck(ANY_STRING): current string to checkunexpected(ANY_STRING):stringToCheckmust be not equal to expectedmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal toonormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck is not equal to unexpected…
lengthIsBetween
- Parameters:
stringToCheck(ANY_STRING): current string to checkminLength(UDINT): lower limit of the string lengthmaxLength(UDINT): upper limit of the string lengthstringLengthUnit(UnicodeStringLengthUnit): string length units of measurementmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is length…
lengthIsExact
- Parameters:
stringToCheck(ANY_STRING): current string to checkexpectedLength(UDINT): expected length ofstringToCheckstringLengthUnit(UnicodeStringLengthUnit): string length units of measurementmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is length…
lengthIsMax
- Parameters:
stringToCheck(ANY_STRING): current string to checkmaxLength(UDINT): upper limit of the length ofstringToCheckstringLengthUnit(UnicodeStringLengthUnit): string length units of measurementmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is length…
lengthIsMin
- Parameters:
stringToCheck(ANY_STRING): current string to checkminLength(UDINT): lower limit of the length ofstringToCheckstringLengthUnit(UnicodeStringLengthUnit): string length units of measurementmessage(AssertMessage): message if the assertion is false
- Return type:
VOID
This assertion method checks if the current string stringToCheck is length…
startsWith
- Parameters:
stringToCheck(ANY_STRING): current string to checkstart(ANY_STRING): expected start ofstringToCheckmessage(AssertMessage): message if the assertion is falseignoreCases(BOOL):TRUEmeans ignore cases;FALSEmeans cases must be equal tootrim(BOOL):TRUEmeans truncation of spaces on the left side ofstringToChecknormalizeStrings(BOOL): normalize both strings for check
- Return type:
VOID
This assertion method checks if the current string stringToCheck starts with start…
Code
Declaration
INTERFACE IUnicodeStringAssertions EXTENDS __SYSTEM.IQueryInterface