Checks that actual value IS NULL or an empty string and report failure if actual value IS NOT NULL or not an empty string.

 Arguments

  • V_ActualValue - actual value, NVARCHAR(4000).
  • v_UserMessage – message to report when assertion fails, NVARCHAR(MAX).

 

Examples

SQL Server

CREATE PROCEDURE UT_DBTD_CheckThatDeliveryNoteIsNULLorEmpty
AS
BEGIN
   DECLARE @v_DeliveryNote VARCHAR(100);
   DECLARE @v_Customer INT = 123456789;
   SET @v_DeliveryNote = dbo.fnGetCustomerDeliveryNote(@v_Customer);

   EXEC DBTD_ASSERT_IS_NULL_OR_EMPTY @v_DeliveryNote, 'DeliveryNote should be empty for a new order';

END;
GO

 

See Also