Last active
December 19, 2015 12:29
-
-
Save kosperera/5954790 to your computer and use it in GitHub Desktop.
One minute unit test code for tombstoning - Code snippet 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Snikt.Specifications.DatabaseSpecs | |
{ | |
[TestClass] | |
public class WhenExecuteQuery | |
{ | |
[TestMethod] | |
public void ThenStrongTypedListIsReturned() | |
{ | |
// Biuld | |
string nameOrConnectionString = "name=DefaultConnection"; | |
IDatabase db = new Database(nameOrConnectionString); | |
// Operator | |
List<Category> categories = db.SqlQuery<Category>("dbo.GetAllCategories").ToList(); | |
// Check | |
AssertListNotEmpty(categories); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment