Browse by Tags
» sql server
» Database Testin...
» Database Unit Testing (RSS)
<Denis Gobo’s mode on>
Suppose you have an empty table:
SELECT COUNT(*) FROM SampleTable
What would be the result of the following query:
DBCC CHECKIDENT('SampleTable', RESEED, 1)
INSERT SampleTable(j) SELECT 1
<Denis Gobo’s mode ...
When you run NUnit/C# unit tests against your local
instance, you are a dbo. As such, you are not getting any errors caused by
missing permissions. However, you can impersonate another user, and run your
unit tests in the context of that other user. The following test harness demonstrates
Well, I have just finished a series of articles about unit testing
on simple-talk.com, and some techniques were not included, just to keep the
articles short. Still problems such as reproducing a lock timeout and unit testing
the retry after it (lock timeout) are interesting, at least to me, so I am
You will need the ...