public void RemoveDtoTest() { var dtos = new HashSet <DomainObjectDTO>(); // 1. Add barebones LP. const string lpGuid = "9719A466-2240-4DEA-9722-9FE0746A30A6"; var lpDto = CreatoDTO(dtos, lpGuid, "LangProject", null); IDomainObjectDTORepository dtoRepos = new DomainObjectDtoRepository(1, dtos, m_mdc, null, TestDirectoryFinder.LcmDirectories); dtoRepos.Remove(lpDto); Assert.IsTrue(((DomainObjectDtoRepository)dtoRepos).Goners.Contains(lpDto), "Goner not in goners set."); Assert.IsNull(dtoRepos.AllInstancesSansSubclasses("LexEntry").FirstOrDefault(), "Found goner by class."); Assert.That(() => dtoRepos.GetDTO(lpDto.Guid), Throws.ArgumentException, "Found deleted DTO by guid."); }