Skip to content

Instantly share code, notes, and snippets.

@kosperera
Last active December 19, 2015 12:29
Show Gist options
  • Save kosperera/5954790 to your computer and use it in GitHub Desktop.
Save kosperera/5954790 to your computer and use it in GitHub Desktop.
One minute unit test code for tombstoning - Code snippet 1
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