Click here to Skip to main content
15,888,968 members
Articles / Programming Languages / C#

Unit Test Your Database Classes

Rate me:
Please Sign up or sign in to vote.
4.20/5 (3 votes)
16 May 2022CPOL4 min read 21.9K   483   7  
How to create a data access class in a way, that is possible to execute unit test on it
This article explains how to create a database access class that allows to implement unit test with XUnit and Moq using ADO.NET.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Avalon Development
United States United States
Jose A. Garcia Guirado, Electronic Engineer, graduated in Havana/Cuba 1982, MCTS, MCSD.NET, MCAD.NET, MCSE. Worked in the Institute for Cybernetics and Mathematics of Academy of Science of Cuba for 8 years; since 1995 working as free software architect, developer and adviser, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxembourg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in Mexico working for Twenty Century Fox, and Mexico Stock Exchange (BMV). From 2013 to now in USA, Florida, First in FAME Inc. and now as Senior Software Engineer in Spirit Airlines.

Comments and Discussions