SysTestAssert.assertNotNull Method [AX 2012]

Checks whether the value is not nullNothingnullptrunita null reference (Nothing in Visual Basic).

Syntax

public void assertNotNull(Object _object, [str _message])

Run On

Called

Parameters

  • _object
    Type: Object Class
    The value that is confirmed not to be nullNothingnullptrunita null reference (Nothing in Visual Basic).
  • _message
    Type: str
    An error message logged when the assertion test fails; optional.

Remarks

To use this method, create a class that extends the SysTestCase class and then add a method to provide your test logic. For an example of how to use an assertion method, see How to: Create a Test Case.

See Also

SysTestAssert Class

SysTestCase Class

Unit Test Framework

Walkthrough: Testing a Class Using the Unit Test Framework