tSQLt - need suggestion

VenkyVenky Posts: 2 New member
Hi Experts,
We have plans to implement DB Unit tests with tSQLt. As part of POC, we have done below. Request you to review and provide your suggestions. Thank you.

We have a stored procedure which accepts XML as a parameter. Within the stored procedure we break the XML and store it in a temp table, then make a join with original table on unique identifier and if a record is found, update other columns of original table. If there is no record in the original table then insert a record.

we created two test cases.
1. Using faketable feature, we verify that when XML content is brand new, a record should insert. Assert expected and actual.

2. Using faketable feature, we verify that when XML content is existing, the record in original should be updated. Assert expected and actual.

Thank you.
Tagged:

Comments

Sign In or Register to comment.