Exemplo n.º 1
0
        public void ThatEntityCanBeIdentifiedByAnId()
        {
            var repos = RepositoryFixture.CreateInMemorySqLiteRepository <TestMapping>("test");
            var ent   = EntityFixture.CreateIntIdEntity();

            repos.Add(ent);

            Assert.AreEqual(ent, repos.First(e => e.Id.Equals(ent.Id)));
        }
        public void ReturnTheEntityThatWasAdded()
        {
            var ent = EntityFixture.CreateIntIdEntity();

            Tests.ReturnTheEntityThatWasAdded(_repos, ent);
        }
        public void ThrowAnErrorWhenTryingToRemoveNonAddedEntity()
        {
            var ent = EntityFixture.CreateIntIdEntity();

            Tests.ThrowAnErrorWhenTryingToRemoveNonAddedEntity(_repos, ent);
        }