public void Should_Retrieve_Persistent_Entity_Successfully() { var user = TestDataProvider.CreateCustomer(); RunDatabaseActionAndAssertionsInTransaction(user, session => { session.SaveOrUpdate(user); session.Flush(); session.Clear(); }, (response, session) => { Repository repository = new Repository(session); var actual = repository.AsQueryable <Customer>(f => f.Name == response.Name && f.Code == response.Code).FirstOrDefault(); Assert.IsNotNull(actual); Assert.AreEqual(user, actual); }); }
public void Should_Check_Customer_Mappings_Successfully() { var entity = TestDataProvider.CreateCustomer(); RunEntityMapTestsInTransaction(entity); }