public void Remove_persisted_entity2()
        {
            MockEntity entity = new MockEntity();

            MockEntityTwo persistedLocation = new MockEntityTwo()
            {
                id = int.MaxValue
            };

            persistedLocation.MarkPersisted();
            MockEntityOne persistedContract = new MockEntityOne()
            {
                id = int.MinValue
            };

            persistedContract.MarkPersisted();
            MockEntity persistedServiceContractSiteContact = new MockEntity()
            {
                IsDeleted = true
            };

            persistedServiceContractSiteContact.MarkPersisted();
            entity.RelationalEntities.Add(persistedServiceContractSiteContact);

            DualDbEntityAssociativeCollectionManager <MockEntityOne, MockEntityTwo, MockEntity> manager = new DualDbEntityAssociativeCollectionManager <MockEntityOne, MockEntityTwo, MockEntity>(1, entity, () => entity.RelationalEntities, null, null, null, (o, ae) => true, (e1, ae) => true, (e2, ae) => true);

            MockEntity removed = manager.Remove(persistedLocation).Single();

            Assert.AreEqual(1, entity.RelationalEntities.Count);
            Assert.AreEqual(persistedServiceContractSiteContact, removed);
            Assert.IsTrue(removed.IsDeleted);
        }
        public void Remove_new_entity2()
        {
            MockEntity    entity      = new MockEntity();
            MockEntityTwo newLocation = new MockEntityTwo()
            {
                id = int.MaxValue
            };
            MockEntityOne newContract = new MockEntityOne()
            {
                id = int.MinValue
            };
            MockEntity newServiceContractSiteContact = new MockEntity()
            {
                IsDeleted = true
            };

            entity.RelationalEntities.Add(newServiceContractSiteContact);
            DualDbEntityAssociativeCollectionManager <MockEntityOne, MockEntityTwo, MockEntity> manager = new DualDbEntityAssociativeCollectionManager <MockEntityOne, MockEntityTwo, MockEntity>(1, entity, () => entity.RelationalEntities, null, null, null, (o, ae) => true, (e1, ae) => true, (e2, ae) => true);

            MockEntity removed = manager.Remove(newContract).Single();

            Assert.AreEqual(0, entity.RelationalEntities.Count);
            Assert.AreEqual(newServiceContractSiteContact, removed);
        }