c# - How to use approval tests for testing databases? -



c# - How to use approval tests for testing databases? -

i approval-test result of database query using classes provided approvaltests.net library. understand how approval tests work, not find single illustration on how utilize classes persistence namespaces. appreciate examples me started.

i refactoring complex sql query. need create sure new version of query returning same resultset after refactoring. think can accomplish this:

dataset dataset = new dataset(); dataset.fill(adapter, connection); stringwriter sw = new stringwriter(); dataset.writexml(sw); string result = sw.tostring(); approvals.verify(result);

but think there improve way using classes persistence namespace without explicit conversion of dataset xml string.

chris made screencast iloader pattern approvaltests.

c# approval-tests

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -