jeudi 9 avril 2015

How do I mock/fake a RaiseError with in a StoredProcedure

This is my first day with tsqlt so you can expect some vague statements.


I am trying to test a storedProcedure which has a Try Catch Block but the actual statements in test are insert and update command.


now I want to test if in case there was an ErrorRaised does my catch block performs the expected tasks.


Can you please guide me on how do I Raise an Error from a stored procedure in test where we do not have anything to mock/fake inside.


Hope my question is understandable, happy to clarify if needed.


Aucun commentaire:

Enregistrer un commentaire