DB Test Driven

 

DBTD_ASSERT_SQLVARIANT_ARE_EQUAL

Assert procedure that takes actual and expected SQL_VARIANT values (a data type that stores values of various SQL Server-supported data types), compares them for equality and report failure if they are not equal. 

Note: If actual or expected, or both values are NULL then assert will fail. 

Arguments

  • V_ActualValue - actual value, SQL_VARIANT
  • V_ExpectedValue - expected value, SQL_VARIANT
  • v_UserMessage – message to report when assertion fails, NVARCHAR(MAX)

 

Examples

SQL Server

      EXEC DBTD_ASSERT_SQLVARIANT_ARE_EQUAL '123456789', 123456789, 'Try this code and check the result';

 

See Also

http://www.dbtestdriven.com/dbtd_assert_sqlvariant_are_equal.aspx