Asserts that stub object were NOT called within the current unit test execution. Fails if stub object were called even once during current unit test execution.
v_PretendObjectName – Name of the pretend object. Supports four part object name. SYSNAME data type.
v_UserMessage – Message to report when assertion fails, NVARCHAR(MAX)
Note: If you are planning to run unit test manually, you must use DBTD_UNIT_TEST hint procedure to explicitly define a unit test procedure as the unit test.
/*Create inner procedure that will be called within outer scope*/
CREATE PROC AddNewUser
/*create unit test procedure*/
CREATE PROCEDURE UT_USERTESTS_STUB_AddNewUserD
--make sure that this test is the part of the USERTESTS suite
EXEC DBTD_UNIT_TEST 'USERTESTS'
EXEC DBTD_CREATE_STUB_PROCEDURE 'STUB_AddNewUser',
--assert that inner procedure were called
@v_PrependObjectName = 'STUB_AddNewUser',
@v_UserMessage = 'We have issues'
--run just one unit test alone to verify results
--note that we will explicitly use transactions
--because we run unit test outside of the DBTestDriven framework