public void NotAcceptAnEntityWithTheSameIdentityTwice() { var ent1 = EntityFixture.CreateEntityWithId(1); var ent2 = EntityFixture.CreateEntityWithId(2); Tests.NotAcceptAnEntityWithTheSameIdentityTwice(_repos, ent1, ent2); }
public void NotAcceptADifferentEntityWithTheSameId() { var ent1 = EntityFixture.CreateEntityWithId(1); var ent2 = EntityFixture.CreateEntityWithId(1); Tests.NotAcceptADifferentEntityWithTheSameId(_repos, ent1, ent2); }
public void HaveTwoItemsWhenTwoEntitiesAreAdded() { var ent1 = EntityFixture.CreateEntityWithId(1); var ent2 = EntityFixture.CreateEntityWithId(2); ent1.Name = "Entity1"; ent2.Name = "Entity2"; Tests.HaveTwoItemsWhenTwoEntitiesAreAdded(_repos, ent1, ent2); }
public void ThatEntityCanBeIdentitiedByItsIdentiy() { var ent = EntityFixture.CreateEntityWithId(1); ent.Name = "TestEntity"; var repos = RepositoryFixture.CreateInMemorySqLiteRepository <TestMapping>("test"); repos.Add(ent); Assert.AreEqual(ent, repos.SingleOrDefault(e => e.IsIdentical(ent))); }
public void ReturnAnEntityById() { var ent1 = EntityFixture.CreateEntityWithId(1); ent1.Name = "Entity1"; var ent2 = EntityFixture.CreateEntityWithId(2); ent2.Name = "Entity2"; Tests.ReturnAnEntityById(_repos, ent1, ent2); }
public void HaveOneItemWhenAnEntityIsAdded() { var ent = EntityFixture.CreateEntityWithId(1); Tests.HaveOneItemWhenAnEntityIsAdded(_repos, ent); }
public void RemoveTestEntityById() { var ent1 = EntityFixture.CreateEntityWithId(1); Tests.RemoveTestEntityById(_repos, ent1); }
public void NotAcceptTheSameEntityTwice() { var ent = EntityFixture.CreateEntityWithId(1); Tests.NotAcceptTheSameEntityTwice(_repos, ent); }