Skip to main content

IUtf8StringAssertions

Short summary

This interface provides assert statements for UTF-8 strings up to 255 bytes length

Attention: All strings are handled as null-terminated byte streams

AccessAbstractFinalExtendsImplements
-NoNo__SYSTEM.IQueryInterface-

UML Diagram

Methods

contains

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • searchString (Tc2_System.T_MaxString): string must be found in stringToCheck
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method checks if the string stringToCheck contains the search string searchString.

containsNo

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • searchString (Tc2_System.T_MaxString): string that must not be found in stringToCheck
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method checks if the current string stringToCheck doesn't contain the search string searchString.

endsWith

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • end (Tc2_System.T_MaxString): expected end of stringToCheck
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • trim (BOOL): TRUE means truncation of spaces on the right side of stringToCheck
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method checks if the current string stringToCheck ends with the string end.

isEmpty

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck is empty.

isEqualTo

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • expected (Tc2_System.T_MaxString): stringToCheck must be equal to expected
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • normalizeStrings (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 (Tc2_System.T_MaxString): current string to check
    • message (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 (Tc2_System.T_MaxString): current string to check
    • unexpected (Tc2_System.T_MaxString): stringToCheck must be not equal to expected
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • normalizeStrings (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 (Tc2_System.T_MaxString): current string to check
    • minLength (USINT): lower limit of the string length
    • maxLength (USINT): upper limit of the string length
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck length is between minLength and maxLength.

lengthIsExact

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • expectedLength (USINT): expected length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck length is equal to expectedLength.

lengthIsMax

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • maxLength (USINT): upper limit of the length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck length is equal or less than to maxLength.

lengthIsMin

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • minLength (USINT): lower limit of the length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck length is equal or grater than to minLength.

startsWith

  • Parameters:
    • stringToCheck (Tc2_System.T_MaxString): current string to check
    • start (Tc2_System.T_MaxString): expected start of stringToCheck
    • message (AssertMessage): message if the assertion is false
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • trim (BOOL): TRUE means truncation of spaces on the left side of stringToCheck
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method checks if the current string stringToCheck starts with string start.

Code

Declaration

INTERFACE IUtf8StringAssertions EXTENDS __SYSTEM.IQueryInterface