Child pages
  • JSUnit

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertEquals(expected, actual)
Asserts that two values are equal.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertEquals(message, expected, actual)
Asserts that two values are equal.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertFalse(boolean_condition)
Asserts that a condition is false.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertFalse(message, boolean_condition)
Asserts that a condition is false.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertFloatEquals(expectedFloat, actualFloat, tolerance)
Asserts that two floating point values are equal to within a given tolerance.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertFloatEquals(message, expectedFloat, actualFloat, tolerance)
Asserts that two floating point values are equal to within a given tolerance.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertMatches(regularExpression, actualString)
Asserts that a regular expression matches a string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertMatches(message, regularExpression, actualString)
Asserts that a regular expression matches a string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotNull(object)
Asserts that an object is not null.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotNull(message, object)
Asserts that an object is not null.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotSame(notExpected, actual)
Asserts that two values are not the same.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotSame(message, notExpected, actual)
Asserts that two values are not the same.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotUndefined(definedObject)
Asserts that an object is not undefined.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNotUndefined(message, definedObject)
Asserts that an object is not undefined.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNull(nullValue)
Asserts that an object is null.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertNull(message, nullValue)
Asserts that an object is null.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertSame(expected, actual)
Asserts that two values are the same.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertSame(message, expected, actual)
Asserts that two values are the same.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertTrue(boolean_condition)
Asserts that a condition is true.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertTrue(message, boolean_condition)
Asserts that a condition is true.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertUndefined(undefinedValue)
Asserts that an object is undefined.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#assertUndefined(message, undefinedValue)
Asserts that an object is undefined.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#fail(message)
Fails a test.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#fail(message, instanceOfCallStack)
Fails a test.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#fail(message, instanceOfCallStack, userMessage)
Fails a test.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idassertEquals-Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertEquals
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertEquals
Span
stylefloat: left;
idiets
(expected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} expected – the expected value.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
jsunit.assertEquals("Solution name test", "someSolution", application.getSolutionName());
jsunit.assertEquals("Simple math test", 2, 1 + 1);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertEquals-String_Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertEquals
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertEquals
Span
stylefloat: left;
idiets
(message, expected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} expected – the expected value.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
jsunit.assertEquals("Solution name test", "someSolution", application.getSolutionName());
jsunit.assertEquals("Simple math test", 2, 1 + 1);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertFalse-Boolean
classnode
Table Row (tr)
idname
Table Cell (td)
assertFalse
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertFalse
Span
stylefloat: left;
idiets
(boolean_condition)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Boolean} boolean_condition – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
jsunit.assertFalse("False test", application.isLastPrintPreviewPrinted());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertFalse-String_Boolean
classnode
Table Row (tr)
idname
Table Cell (td)
assertFalse
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertFalse
Span
stylefloat: left;
idiets
(message, boolean_condition)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Boolean} boolean_condition – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
jsunit.assertFalse("False test", application.isLastPrintPreviewPrinted());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertFloatEquals-Number_Number_Number
classnode
Table Row (tr)
idname
Table Cell (td)
assertFloatEquals
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertFloatEquals
Span
stylefloat: left;
idiets
(expectedFloat, actualFloat, tolerance)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is not within the tolerance of the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} expectedFloat – the expected value.
{Number} actualFloat – the actual value.
{Number} tolerance – tolerance when comparing.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is not within the tolerance of the actual one.
jsunit.assertFloatEquals("Float equals test", 3.12, 3.121, 0.0015);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertFloatEquals-String_Number_Number_Number
classnode
Table Row (tr)
idname
Table Cell (td)
assertFloatEquals
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertFloatEquals
Span
stylefloat: left;
idiets
(message, expectedFloat, actualFloat, tolerance)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is not within the tolerance of the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Number} expectedFloat – the expected value.
{Number} actualFloat – the actual value.
{Number} tolerance – tolerance when comparing.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is not within the tolerance of the actual one.
jsunit.assertFloatEquals("Float equals test", 3.12, 3.121, 0.0015);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertMatches-Object_String
classnode
Table Row (tr)
idname
Table Cell (td)
assertMatches
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertMatches
Span
stylefloat: left;
idiets
(regularExpression, actualString)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} regularExpression – the regular expression used for matching.
{String} actualString – the actual value to be matched.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
jsunit.assertMatches(new RegExp("gr(a|e)y"), "gray");
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertMatches-String_Object_String
classnode
Table Row (tr)
idname
Table Cell (td)
assertMatches
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertMatches
Span
stylefloat: left;
idiets
(message, regularExpression, actualString)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} regularExpression – the regular expression used for matching.
{String} actualString – the actual value to be matched.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
jsunit.assertMatches("Match test", new RegExp("gr(a|e)y"), "gray");
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotNull-Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotNull
Span
stylefloat: left;
idiets
(object)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} object – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
var a; // this is undefined, not null
jsunit.assertNotNull(a);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotNull-String_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotNull
Span
stylefloat: left;
idiets
(message, object)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} object – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
var a; // this is undefined, not null
jsunit.assertNotNull("Not null test", a);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotSame-Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotSame
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotSame
Span
stylefloat: left;
idiets
(notExpected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} notExpected – the value that is not expected.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
var a = new Date(1990, 1, 1);
var b = new Date(1990, 1, 1);
jsunit.assertNotSame(a, b);
jsunit.assertEquals("But equals", a, b);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotSame-String_Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotSame
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotSame
Span
stylefloat: left;
idiets
(message, notExpected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} notExpected – the value that is not expected.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
var a = new Date(1990, 1, 1);
var b = new Date(1990, 1, 1);
jsunit.assertNotSame("Not same test", a, b);
jsunit.assertEquals("But equals", a, b);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotUndefined-Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotUndefined
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotUndefined
Span
stylefloat: left;
idiets
(definedObject)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} definedObject – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
var a = 0;
jsunit.assertNotUndefined(a);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNotUndefined-String_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNotUndefined
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNotUndefined
Span
stylefloat: left;
idiets
(message, definedObject)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} definedObject – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
var a = 0;
jsunit.assertNotUndefined("Not undefined test", a);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNull-Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNull
Span
stylefloat: left;
idiets
(nullValue)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} nullValue – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
jsunit.assertNull("Null test", null);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertNull-String_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertNull
Span
stylefloat: left;
idiets
(message, nullValue)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} nullValue – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
jsunit.assertNull("Null test", null);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertSame-Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertSame
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertSame
Span
stylefloat: left;
idiets
(expected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} expected – the expected value.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
var a = new Date(1990, 1, 1);
var b = a;
jsunit.assertSame(a, b);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertSame-String_Object_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertSame
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertSame
Span
stylefloat: left;
idiets
(message, expected, actual)
Table Row (tr)
iddes
Table Cell (td)
Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} expected – the expected value.
{Object} actual – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
var a = new Date(1990, 1, 1);
var b = a;
jsunit.assertSame("Same test", a, b);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertTrue-Boolean
classnode
Table Row (tr)
idname
Table Cell (td)
assertTrue
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertTrue
Span
stylefloat: left;
idiets
(boolean_condition)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Boolean} boolean_condition – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
jsunit.assertTrue("True test", application.isLastPrintPreviewPrinted());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertTrue-String_Boolean
classnode
Table Row (tr)
idname
Table Cell (td)
assertTrue
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertTrue
Span
stylefloat: left;
idiets
(message, boolean_condition)
Table Row (tr)
iddes
Table Cell (td)
Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Boolean} boolean_condition – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
jsunit.assertTrue("True test", application.isLastPrintPreviewPrinted());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertUndefined-Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertUndefined
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertUndefined
Span
stylefloat: left;
idiets
(undefinedValue)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} undefinedValue – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
jsunit.assertUndefined("Undefined test", thisIsUndefined);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idassertUndefined-String_Object
classnode
Table Row (tr)
idname
Table Cell (td)
assertUndefined
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
assertUndefined
Span
stylefloat: left;
idiets
(message, undefinedValue)
Table Row (tr)
iddes
Table Cell (td)
Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message.
{Object} undefinedValue – the actual value.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
jsunit.assertUndefined(thisIsUndefined);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idfail-String
classnode
Table Row (tr)
idname
Table Cell (td)
fail
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
fail
Span
stylefloat: left;
idiets
(message)
Table Row (tr)
iddes
Table Cell (td)
Fails a test. AssertionFailedError is always thrown.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message. This is usually the only parameter specified when calling this method.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Fails a test. AssertionFailedError is always thrown.
jsunit.fail("Fail test");
jsunit.fail("test", null, "Fail"); // 2nd param is not used in Servoy, params 3 and 1 get merged to form a message. The result is the same as in the line above.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idfail-String_Object
classnode
Table Row (tr)
idname
Table Cell (td)
fail
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
fail
Span
stylefloat: left;
idiets
(message, instanceOfCallStack)
Table Row (tr)
iddes
Table Cell (td)
Fails a test. AssertionFailedError is always thrown.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message. This is usually the only parameter specified when calling this method.
{Object} instanceOfCallStack – an internal JSUnit call stack. Use null for this if you want to get to the next optional parameter. Usually not specified.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Fails a test. AssertionFailedError is always thrown.
jsunit.fail("Fail test");
jsunit.fail("test", null, "Fail"); // 2nd param is not used in Servoy, params 3 and 1 get merged to form a message. The result is the same as in the line above.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idfail-String_Object_String
classnode
Table Row (tr)
idname
Table Cell (td)
fail
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
fail
Span
stylefloat: left;
idiets
(message, instanceOfCallStack, userMessage)
Table Row (tr)
iddes
Table Cell (td)
Fails a test. AssertionFailedError is always thrown.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} message – The test description/message. This is usually the only parameter specified when calling this method.
{Object} instanceOfCallStack – an internal JSUnit call stack. Use null for this if you want to get to the next optional parameter. Usually not specified.
{String} userMessage – a user message. Usually not specified.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Fails a test. AssertionFailedError is always thrown.
jsunit.fail("Fail test");
jsunit.fail("test", null, "Fail"); // 2nd param is not used in Servoy, params 3 and 1 get merged to form a message. The result is the same as in the line above.
Table Row (tr)
classlastDetailRow
Table Cell (td)