Child pages
  • JSUnit

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryvoidAsserts that two values are equal.voidAsserts that two values are equal.voidAsserts that a condition is false.voidAsserts that a condition is false.voidAsserts that two floating point values are equal to within a given tolerance.voidAsserts that two floating point values are equal to within a given tolerance.voidAsserts that a regular expression matches a string.voidAsserts that a regular expression matches a string.voidAsserts that an object is not null.voidAsserts that an object is not null.voidAsserts that two values are not the same.voidAsserts that two values are not the same.voidAsserts that an object is not undefined.voidAsserts that an object is not undefined.voidAsserts that an object is null.voidAsserts that an object is null.voidAsserts that two values are the same.voidAsserts that two values are the same.voidAsserts that a condition is true.voidAsserts that a condition is true.voidAsserts that an object is undefined.voidAsserts that an object is undefined.voidFails a test.voidFails a test.voidFails a test.

functionservoy sDetail2100%height:30px2Methods DetailsassertEqualsname

assertEquals(expected, actual)

dessIndent
Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
prs

Parameters

sIndentexpectedthe expected value.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowassertEqualsname

assertEquals(message, expected, actual)

dessIndent
Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression.
prs

Parameters

sIndentmessageThe test description/message.expectedthe expected value.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertFalsename

assertFalse(boolean_condition)

dessIndent
Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
prs

Parameters

sIndentboolean_conditionthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertFalsename

assertFalse(message, boolean_condition)

dessIndent
Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
prs

Parameters

sIndentmessageThe test description/message.boolean_conditionthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertFloatEqualsname

assertFloatEquals(expectedFloat, actualFloat, tolerance)

dessIndent
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.
prs

Parameters

sIndentexpectedFloatthe expected value.actualFloatthe actual value.tolerancetolerance when comparing.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertFloatEqualsname

assertFloatEquals(message, expectedFloat, actualFloat, tolerance)

dessIndent
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.
prs

Parameters

sIndentmessageThe test description/message.expectedFloatthe expected value.actualFloatthe actual value.tolerancetolerance when comparing.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertMatchesname

assertMatches(regularExpression, actualString)

dessIndent
Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
prs

Parameters

sIndentregularExpressionthe regular expression used for matching.actualStringthe actual value to be matched.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertMatchesname

assertMatches(message, regularExpression, actualString)

dessIndent
Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.
prs

Parameters

sIndentmessageThe test description/message.regularExpressionthe regular expression used for matching.actualStringthe actual value to be matched.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotNullname

assertNotNull(object)

dessIndent
Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
prs

Parameters

sIndentobjectthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotNullname

assertNotNull(message, object)

dessIndent
Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.
prs

Parameters

sIndentmessageThe test description/message.objectthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotSamename

assertNotSame(notExpected, actual)

dessIndent
Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
prs

Parameters

sIndentnotExpectedthe value that is not expected.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotSamename

assertNotSame(message, notExpected, actual)

dessIndent
Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.
prs

Parameters

sIndentmessageThe test description/message.notExpectedthe value that is not expected.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotUndefinedname

assertNotUndefined(definedObject)

dessIndent
Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
prs

Parameters

sIndentdefinedObjectthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNotUndefinedname

assertNotUndefined(message, definedObject)

dessIndent
Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
prs

Parameters

sIndentmessageThe test description/message.definedObjectthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNullname

assertNull(nullValue)

dessIndent
Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
prs

Parameters

sIndentnullValuethe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertNullname

assertNull(message, nullValue)

dessIndent
Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
prs

Parameters

sIndentmessageThe test description/message.nullValuethe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertSamename

assertSame(expected, actual)

dessIndent
Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
prs

Parameters

sIndentexpectedthe expected value.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertSamename

assertSame(message, expected, actual)

dessIndent
Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.
prs

Parameters

sIndentmessageThe test description/message.expectedthe expected value.actualthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertTruename

assertTrue(boolean_condition)

dessIndent
Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
prs

Parameters

sIndentboolean_conditionthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertTruename

assertTrue(message, boolean_condition)

dessIndent
Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
prs

Parameters

sIndentmessageThe test description/message.boolean_conditionthe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertUndefinedname

assertUndefined(undefinedValue)

dessIndent
Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
prs

Parameters

sIndentundefinedValuethe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
assertUndefinedname

assertUndefined(message, undefinedValue)

dessIndent
Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
prs

Parameters

sIndentmessageThe test description/message.undefinedValuethe actual value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
failname

fail(message)

dessIndent
Fails a test. AssertionFailedError is always thrown.
prs

Parameters

sIndentmessageThe test description/message. This is usually the only parameter specified when calling this method.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
failname

fail(message, instanceOfCallStack)

dessIndent
Fails a test. AssertionFailedError is always thrown.
prs

Parameters

sIndentmessageThe test description/message. This is usually the only parameter specified when calling this method.instanceOfCallStackan internal JSUnit call stack. Use null for this if you want to get to the next optional parameter. Usually not specified.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
failname

fail(message, instanceOfCallStack, userMessage)

dessIndent
Fails a test. AssertionFailedError is always thrown.
prs

Parameters

sIndentmessageThe test description/message. This is usually the only parameter specified when calling this method.instanceOfCallStackan internal JSUnit call stack. Use null for this if you want to get to the next optional parameter. Usually not specified.userMessagea user message. Usually not specified.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow