How do I unit test persistence?
[TestFixture]
[SqlRestoreInfo(<connectionsting>, <name>,<backupLocation>]
public class Tests
{
[SetUp]
public void Setup()
{
}
[Test]
[RollBack]
public void TEST()
{
//test insert.
}
}
Tags: sql-server tdd unit-testing
Source: By Jon Limjap as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- What is a change to SQL Server tables?
- How do I upgrade my SQL Server database version?
- What is the best implementation of MySQL for SQL Server 2005?
- How can I use combinations of sets as test data?
- The ability to edit a database by multiple users is essential.
- How do you copy a data base?
- Convert HashBytes to VarChart?
- Is there any way to test flex application with a build script?
- What is the difference between a TDD and a BDD?
- How do I divide a string so I can access item x?
- How do you get the data from a temporary table in SQL Server?
- How do I use T-SQL group?
- How much disk space does a SQL Server table currently use?
- Can you remove the time portion of a datetime value?
- How do you get leading wildcard full-text searches in SQL Server?