public void it_should_get_all_entities_including_deleted_if_specified()
        {
            const int    id1                    = 1;
            const int    id2                    = 2;
            const string expectedAddress        = "Line 1";
            const string expectedDeletedAddress = "Deleted Line 1";

            using (var context = new GLAAContext(options))
            {
                context.Addresses.Add(new Address {
                    Id = id1, AddressLine1 = expectedAddress
                });
                context.Addresses.Add(new Address {
                    Id = id2, AddressLine1 = expectedDeletedAddress, Deleted = true
                });
                context.SaveChanges();
            }

            using (var context = new GLAAContext(options))
            {
                var repo   = new EntityFrameworkRepositoryBase(context, dtp);
                var result = repo.GetAll <Address>(true).ToArray();
                Assert.AreEqual(2, result.Length);
                var result1 = result.Single(x => x.Id == id1);
                var result2 = result.Single(x => x.Id == id2);
                Assert.AreEqual(expectedAddress, result1.AddressLine1);
                Assert.AreEqual(expectedDeletedAddress, result2.AddressLine1);
                Assert.IsTrue(result2.Deleted);
            }
        }
        public void it_should_get_all_non_deleted_entities()
        {
            const int    id = 1;
            const string expectedAddress = "Line 1";

            using (var context = new GLAAContext(options))
            {
                context.Addresses.Add(new Address {
                    Id = id, AddressLine1 = expectedAddress
                });
                context.Addresses.Add(new Address {
                    Id = 2, AddressLine1 = expectedAddress, Deleted = true
                });
                context.SaveChanges();
            }

            using (var context = new GLAAContext(options))
            {
                var repo   = new EntityFrameworkRepositoryBase(context, dtp);
                var result = repo.GetAll <Address>().ToArray();
                Assert.AreEqual(1, result.Length);
                Assert.AreEqual(id, result.Single().Id);
                Assert.AreEqual(expectedAddress, result.Single().AddressLine1);
            }
        }