Skip to main content

StringAssertions

Short summary

This class provides assert statements for strings For UTF-16 strings up to 255 WORD (WSTRING(Tc2_System.MAX_STRING_LENGTH)) use the property IStringAssertions.utf16. For windows-1252 strings up to 255 BYTE (Tc2_System.T_MaxString) use the property IStringAssertions.windows1252. For windows-1252 or UTF-16 strings that are longer, use the property IStringAssertions.anyString

AccessAbstractFinalExtendsImplements
INTERNALNoNoCNM_AbstractObject.ObjectIStringAssertions, IAssertCallBackSetter

UML Diagram

Parameters

none

Properties

className

Type: CNM_AbstractObject.ClassName

This abstract property returns the class name of the concrete object,

unicode

Type: IUnicodeStringAssertions

Returns an interface IUnicodeStringAssertions with assert statements,

utf16

Type: IUtf16StringAssertions

Returns an interface IUtf16StringAssertions with assert statements

utf8

Type: IUtf8StringAssertions

Returns an interface IUtf8StringAssertions with assert statements

windows125x

Type: IWindows125xStringAssertions

Returns an interface IWindows125xStringAssertions with assert statements for 8-bit

Methods

setCallBack

  • Parameters:
    • callBack (IAssertCallBack): the class that must be informed if an assertion is false
  • Return type: VOID

This methods is the setter for the callback class if an assertion was false

Code

Declaration

{attribute 'reflection'}
FUNCTION_BLOCK INTERNAL StringAssertions EXTENDS CNM_AbstractObject.Object IMPLEMENTS IStringAssertions, IAssertCallBackSetter
VAR
(* class to handle windows-1252 and windows-1251 assertions *)
win125xStringAssertions :Windows125xStringAssertions();
(* class to handle UTF-16 assertions *)
utf16StringAssertions :Utf16StringAssertions();
(* class to handle UTF-8 assertions *)
utf8StringAssertions :Utf8StringAssertions();
(* class to handle Unicode assertions with anys string*)
UnicodeAssertions :UnicodeAssertions();
END_VAR