Created
August 15, 2013 21:06
-
-
Save daanl/6244899 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
[Test] | |
public async Task Can_Save_OrderEvent_With_EntityFramework_And_PostgresSQL() | |
{ | |
using (var context = new CqrsContext()) | |
{ | |
var orderEvent = new OrderEvent | |
{ | |
Id = Guid.NewGuid() | |
}; | |
context.OrdersEvents.Add(orderEvent); | |
await context.SaveChangesAsync(); | |
var cancellationTokenSource = new CancellationTokenSource(); | |
var orderEventFromDatabase = await context.OrdersEvents.FindAsync(cancellationTokenSource.Token, orderEvent.Id); | |
Assert.AreEqual(orderEvent.Id, orderEventFromDatabase.Id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment