Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
id | assertEquals-Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertEquals |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} expected - the expected value. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertEquals-String_Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertEquals |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, expected, actual) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} expected - the expected value. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertFalse |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Boolean} boolean_condition - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
jsunit.assertFalse("False test", application.isLastPrintPreviewPrinted()); |
|
|
|
|
Table Body (tbody) |
---|
id | assertFalse-String_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertFalse |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, boolean_condition) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Boolean} boolean_condition - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false.
jsunit.assertFalse("False test", application.isLastPrintPreviewPrinted()); |
|
|
|
|
Table Body (tbody) |
---|
id | assertFloatEquals-Number_Number_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertFloatEquals |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(expectedFloat, actualFloat, tolerance) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Number} expectedFloat - the expected value. {Number} actualFloat - the actual value. {Number} tolerance - tolerance when comparing. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected |
|
|
|
| evaluationwasfalse.
jsunit.assertFalse("False test", application.isLastPrintPreviewPrinted());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=668BDF71-F33C-4766-B318-9825F0B100D1}{tr:id=name}{td}h6.assertFloatEquals{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertFloatEquals{span}{span:id=iets|style=float: left;}\(message, expectedFloat, actualFloat, tolerance){span}{td}{tr}{tr:id=des}{td}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_des|text=|trigger=button}{sub-section}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_prs|trigger=none}\[message\] -- The test description/message.
expectedFloat -- the expected value.
actualFloat -- the actual value.
tolerance -- float tolerance when comparing.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_ret|text=|trigger=button}{sub-section}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_see|text=|trigger=button}{sub-section}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_see|text=|trigger=button}{sub-section}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_sam|text=|trigger=button}{sub-section}{sub-section:668BDF71-F33C-4766-B318-9825F0B100D1_sam|class=sIndent|trigger=none}{code:language=javascript}
// 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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=39225631-D07D-42FA-8ACE-5957328C0164}{tr:id=name}{td}h6.assertMatches{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertMatches{span}{span:id=iets|style=float: left;}\(message, regularExpression, actualString){span}{td}{tr}{tr:id=des}{td}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_des|text=|trigger=button}{sub-section}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_des|trigger=none|class=sIndent}Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_prs|trigger=none}\[message\] -- The test description/message.
regularExpression -- the regular expression used for matching.
actualString -- the actual value to be matched.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_ret|text=|trigger=button}{sub-section}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_see|text=|trigger=button}{sub-section}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_see|text=|trigger=button}{sub-section}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_sam|text=|trigger=button}{sub-section}{sub-section:39225631-D07D-42FA-8ACE-5957328C0164_sam|class=sIndent|trigger=none}{code:language=javascript}
// Asserts that a regular expression matches a stringwithin the tolerance of the actual one.
jsunit.assertFloatEquals("Float equals test", 3.12, 3.121, 0.0015); |
|
|
|
|
Table Body (tbody) |
---|
id | assertFloatEquals-String_Number_Number_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertFloatEquals |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, expectedFloat, actualFloat, tolerance) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Number} expectedFloat - the expected value. {Number} actualFloat - the actual value. {Number} tolerance - tolerance when comparing. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertMatches-Object_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertMatches |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(regularExpression, actualString) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} regularExpression - the regular expression used for matching. {String} actualString - the actual value to be matched. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertMatches-String_Object_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertMatches |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, regularExpression, actualString) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotNull |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is not null. AssertionFailedError is thrown if the object is not null. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} object - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is not null. AssertionFailedError is thrown if the |
|
|
|
| expected value the actual one.
jsunit.assertMatches("Match test", new RegExp("gr(a|e)y"), "gray");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BBD81400-2D30-4B1A-9CAB-76CF491FB621}{tr:id=name}{td}h6.assertNotNull{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertNotNull{span}{span:id=iets|style=float: left;}\(message, object){span}{td}{tr}{tr:id=des}{td}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_des|text=|trigger=button}{sub-section}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_des|trigger=none|class=sIndent}Asserts that an object is not null. AssertionFailedError is thrown if the object is not null.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_prs|trigger=none}\[message\] -- The test description/message.
object -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_ret|text=|trigger=button}{sub-section}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_see|text=|trigger=button}{sub-section}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_see|text=|trigger=button}{sub-section}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_sam|text=|trigger=button}{sub-section}{sub-section:BBD81400-2D30-4B1A-9CAB-76CF491FB621_sam|class=sIndent|trigger=none}{code:language=javascript}
// 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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910}{tr:id=name}{td}h6.assertNotSame{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertNotSame{span}{span:id=iets|style=float: left;}\(message, notExpected, actual){span}{td}{tr}{tr:id=des}{td}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_des|text=|trigger=button}{sub-section}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_des|trigger=none|class=sIndent}Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_prs|trigger=none}\[message\] -- The test description/message.
notExpected -- the value that is not expected.
actual -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_ret|text=|trigger=button}{sub-section}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_see|text=|trigger=button}{sub-section}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_see|text=|trigger=button}{sub-section}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_sam|text=|trigger=button}{sub-section}{sub-section:1DE5E0FD-A4E3-4CD1-9A97-B5B02B184910_sam|class=sIndent|trigger=none}{code:language=javascript}
// 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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=57FDE2A3-DC4F-4836-91A0-F46D97F85D91}{tr:id=name}{td}h6.assertNotUndefined{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertNotUndefined{span}{span:id=iets|style=float: left;}\(message, definedObject){span}{td}{tr}{tr:id=des}{td}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_des|text=|trigger=button}{sub-section}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_des|trigger=none|class=sIndent}Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_prs|trigger=none}\[message\] -- The test description/message.
definedObject -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_ret|text=|trigger=button}{sub-section}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_see|text=|trigger=button}{sub-section}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_see|text=|trigger=button}{sub-section}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_sam|text=|trigger=button}{sub-section}{sub-section:57FDE2A3-DC4F-4836-91A0-F46D97F85D91_sam|class=sIndent|trigger=none}{code:language=javascript}
// Asserts that an object is not undefined null.
var a; // this is undefined, not null
jsunit.assertNotNull(a); |
|
|
|
|
Table Body (tbody) |
---|
id | assertNotNull-String_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotNull |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is not null. AssertionFailedError is thrown if the object is not null. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} object - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertNotSame-Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotSame |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(notExpected, actual) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} notExpected - the value that is not expected. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertNotSame-String_Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotSame |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, notExpected, actual) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} notExpected - the value that is not expected. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | assertNotUndefined-Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotUndefined |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} definedObject - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined.
var a = 0;
jsunit.assertNotUndefined(a); |
|
|
|
|
Table Body (tbody) |
---|
id | assertNotUndefined-String_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNotUndefined |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, definedObject) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} definedObject - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNull |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is null. AssertionFailedError is thrown if the object is not null. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} nullValue - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
jsunit.assertNull("Null test", null); |
|
|
|
|
Table Body (tbody) |
---|
id | assertNull-String_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertNull |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is null. AssertionFailedError is thrown if the object is not null. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} nullValue - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is null. AssertionFailedError is thrown if the object is not null.
jsunit.assertNull("Null test", null); |
|
|
|
|
Table Body (tbody) |
---|
id | assertSame-Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertSame |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} expected - the expected value. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that two values are the same. AssertionFailedError is thrown if the expected |
|
|
|
| object undefined not the actual one.
var a = new Date(1990, 1, 1);
var b = |
|
|
|
| 0assertNotUndefined("Not undefined test"a
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=395523AE-8D6F-4DAA-8388-7FB2D07374C1}{tr:id=name}{td}h6.assertNull{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertNull{span}{span:id=iets|style=float: left;}\(message, nullValue){span}{td}{tr}{tr:id=des}{td}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_des|text=|trigger=button}{sub-section}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_des|trigger=none|class=sIndent}Asserts that an object is null. AssertionFailedError is thrown if the object is not null.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_prs|trigger=none}\[message\] -- The test description/message.
nullValue -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_ret|text=|trigger=button}{sub-section}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_see|text=|trigger=button}{sub-section}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_see|text=|trigger=button}{sub-section}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_sam|text=|trigger=button}{sub-section}{sub-section:395523AE-8D6F-4DAA-8388-7FB2D07374C1_sam|class=sIndent|trigger=none}{code:language=javascript}
// Asserts that an object is null Table Body (tbody) |
---|
id | assertSame-String_Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertSame |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, expected, actual) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} expected - the expected value. {Object} actual - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertTrue |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Boolean} boolean_condition - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
jsunit.assertTrue("True test", application.isLastPrintPreviewPrinted()); |
|
|
|
|
Table Body (tbody) |
---|
id | assertTrue-String_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertTrue |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, boolean_condition) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Boolean} boolean_condition - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that a condition is true. AssertionFailedError is thrown if the |
|
|
|
| objectisnullassertNullNullnull);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=93B0CF70-5A8E-4B92-92DF-2B02E30A301C}{tr:id=name}{td}h6.assertSame{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertSame{span}{span:id=iets|style=float: left;}\(message, expected, actual){span}{td}{tr}{tr:id=des}{td}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_des|text=|trigger=button}{sub-section}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_des|trigger=none|class=sIndent}Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_prs|trigger=none}\[message\] -- The test description/message.
expected -- the expected value.
actual -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_ret|text=|trigger=button}{sub-section}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_see|text=|trigger=button}{sub-section}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_see|text=|trigger=button}{sub-section}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_sam|text=|trigger=button}{sub-section}{sub-section:93B0CF70-5A8E-4B92-92DF-2B02E30A301C_sam|class=sIndent|trigger=none}{code:language=javascript}
// 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);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D432F5FF-EAF7-4293-B4F1-3540EE87E359}{tr:id=name}{td}h6.assertTrue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertTrue{span}{span:id=iets|style=float: left;}\(message, boolean_condition){span}{td}{tr}{tr:id=des}{td}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_des|text=|trigger=button}{sub-section}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_des|trigger=none|class=sIndent}Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_prs|trigger=none}\[message\] -- The test description/message.
boolean_condition -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_ret|text=|trigger=button}{sub-section}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_see|text=|trigger=button}{sub-section}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_see|text=|trigger=button}{sub-section}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_sam|text=|trigger=button}{sub-section}{sub-section:D432F5FF-EAF7-4293-B4F1-3540EE87E359_sam|class=sIndent|trigger=none}{code:language=javascript}
// Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true.
jsunit.assertTrue("True test", application.isLastPrintPreviewPrinted());
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=85E155A7-AE9A-49FC-AE05-4756A63FCF4C}{tr:id=name}{td}h6.assertUndefined{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}assertUndefined{span}{span:id=iets|style=float: left;}\(message, undefinedValue){span}{td}{tr}{tr:id=des}{td}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_des|text=|trigger=button}{sub-section}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_des|trigger=none|class=sIndent}Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_prs|trigger=none}\[message\] -- The test description/message.
undefinedValue -- the actual value.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_ret|text=|trigger=button}{sub-section}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_see|text=|trigger=button}{sub-section}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_see|text=|trigger=button}{sub-section}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_sam|text=|trigger=button}{sub-section}{sub-section:85E155A7-AE9A-49FC-AE05-4756A63FCF4C_sam|class=sIndent|trigger=none}{code:language=javascript}
// Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
jsunit.assertUndefined("Undefined test", thisIsUndefined);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AC4168CE-7859-4E73-B895-4EF42F90453F}{tr:id=name}{td}h6.fail{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}fail{span}{span:id=iets|style=float: left;}\(message, instanceOfCallStack, userMessage){span}{td}{tr}{tr:id=des}{td}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_des|text=|trigger=button}{sub-section}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_des|trigger=none|class=sIndent}Fails a test. AssertionFailedError is always thrown.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_prs|trigger=none}\[message\] -- The test description/message. This is usually the only parameter specified when calling this method.
\[instanceOfCallStack\] -- an internal JSUnit call stack. Use null for this if you want to get to the next optional parameter. Usually not specified.
\[userMessage\] -- an user message. Usually not specified.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_ret|text=|trigger=button}{sub-section}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_see|text=|trigger=button}{sub-section}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_see|text=|trigger=button}{sub-section}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_sam|text=|trigger=button}{sub-section}{sub-section:AC4168CE-7859-4E73-B895-4EF42F90453F_sam|class=sIndent|trigger=none}{code:language=javascript}
application.isLastPrintPreviewPrinted()); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertUndefined |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} undefinedValue - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
jsunit.assertUndefined("Undefined test", thisIsUndefined); |
|
|
|
|
Table Body (tbody) |
---|
id | assertUndefined-String_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
assertUndefined |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, undefinedValue) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. {Object} undefinedValue - the actual value. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined.
jsunit.assertUndefined(thisIsUndefined); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Fails a test. AssertionFailedError is always thrown. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} message - The test description/message. This is usually the only parameter specified when calling this method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, instanceOfCallStack) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Fails a test. AssertionFailedError is always thrown. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 Body (tbody) |
---|
id | fail-String_Object_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(message, instanceOfCallStack, userMessage) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Fails a test. AssertionFailedError is always thrown. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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. |
|
|
|
|
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |