Skip to content

AssertEquals

Fails the current server workflow script unless the values are equal.

myScript.AssertEquals(expected: any, actual: any, message?: string):void

Parameters

any expected
    The expected value.

any actual
    The value to verify.

string message optional
    Error text returned in the thrown JavaScript Error.

Remarks

Server workflow scripts only. Equality is evaluated by .NET after proxy values such as dates and identities are normalized; do not assume JavaScript loose-equality coercion.

Example

1
2
var completedCount = 3;
Script.AssertEquals(3, completedCount, "All items must be completed.");