Last active
January 27, 2016 01:26
-
-
Save plioi/7ab37ebe3d7a86fc4583 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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