Skip to content

Instantly share code, notes, and snippets.

@plioi
Last active January 27, 2016 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plioi/7ab37ebe3d7a86fc4583 to your computer and use it in GitHub Desktop.
Save plioi/7ab37ebe3d7a86fc4583 to your computer and use it in GitHub Desktop.
using System.Linq;
using ContactList.Core.Domain;
using ContactList.Tests;
using static Testing;
public class EntityTests
{
[AllEntities]
public void ShouldPersist<TEntity>(TEntity entity) where TEntity : Entity
{
Save(entity);
Transaction(db =>
{
var loaded = db.Set<TEntity>().Single();
loaded.ShouldMatch(entity);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment