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.

Returns

sIndentfunctionservoy sDetail2100%height:30px2Methods DetailsassertEqualsname

assertEquals(expected, actual)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertEqualsname

assertEquals(message, expected, actual)

dessIndentAsserts 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.
retclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertFalsename

assertFalse(boolean_condition)

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

Parameters

sIndentboolean_conditionthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertFalsename

assertFalse(message, boolean_condition)

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

Parameters

sIndentmessageThe test description/message.boolean_conditionthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertFloatEqualsname

assertFloatEquals(expectedFloat, actualFloat, tolerance)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertFloatEqualsname

assertFloatEquals(message, expectedFloat, actualFloat, tolerance)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertMatchesname

assertMatches(regularExpression, actualString)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertMatchesname

assertMatches(message, regularExpression, actualString)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotNullname

assertNotNull(object)

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

Parameters

sIndentobjectthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotNullname

assertNotNull(message, object)

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

Parameters

sIndentmessageThe test description/message.objectthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotSamename

assertNotSame(notExpected, actual)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotSamename

assertNotSame(message, notExpected, actual)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotUndefinedname

assertNotUndefined(definedObject)

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

Parameters

sIndentdefinedObjectthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNotUndefinedname

assertNotUndefined(message, definedObject)

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

Parameters

sIndentmessageThe test description/message.definedObjectthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNullname

assertNull(nullValue)

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

Parameters

sIndentnullValuethe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertNullname

assertNull(message, nullValue)

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

Parameters

sIndentmessageThe test description/message.nullValuethe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertSamename

assertSame(expected, actual)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertSamename

assertSame(message, expected, actual)

dessIndentAsserts 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertTruename

assertTrue(boolean_condition)

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

Parameters

sIndentboolean_conditionthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertTruename

assertTrue(message, boolean_condition)

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

Parameters

sIndentmessageThe test description/message.boolean_conditionthe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertUndefinedname

assertUndefined(undefinedValue)

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

Parameters

sIndentundefinedValuethe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
assertUndefinedname

assertUndefined(message, undefinedValue)

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

Parameters

sIndentmessageThe test description/message.undefinedValuethe actual value.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
failname

fail(message)

dessIndentFails a test. AssertionFailedError is always thrown.prs

Parameters

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

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
failname

fail(message, instanceOfCallStack)

dessIndentFails 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
failname

fail(message, instanceOfCallStack, userMessage)

dessIndentFails 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.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow