I have to create database on the setup
event and drop into teardown
event,the flow is working when i have not used TestCaseSource
.But the moment come i have to used TestCaseSource
then the execution order of NUnit
test case is changed.
My database is not created (you can say setup
event not called),But I have to used TestCaseSource
for pulling data from table which is created by the setup
event and dropped into teardown
.
Please suggest how to deal this type of scenario.I am using VS 2013
Thanks in advance
I think what you are saying is that using TestCaseSource results in attempting to pull data from a database that has not been created yet (in a SetUp method).
This is just the way NUnit works, see https://github.com/nunit/nunit/issues/141
Maybe you could have TestCaseSource return the query/queries you want to test (instead of the data), and execute the query in the test (after your SetUp has run)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With