void VerifyChanges(ICmObject[] expectedNewbies, ICmObject[] expectedDirtballs, ICmObjectId[] expectedGoners, IUnitOfWorkService m_uowService) { var newbies = new HashSet<ICmObjectId>(); var dirtballs = new HashSet<ICmObjectOrSurrogate>(new ObjectSurrogateEquater()); var goners = new HashSet<ICmObjectId>(); m_uowService.GatherChanges(newbies, dirtballs, goners); var setNewbies = new HashSet<ICmObjectId>(from obj in expectedNewbies select obj.Id); Assert.That(newbies.Except(setNewbies), Is.Empty, "some unexpected newbies were found"); Assert.That(setNewbies.Except(newbies), Is.Empty, "some expected newbies were not found"); var setDirtballs = new HashSet<ICmObjectOrSurrogate>(expectedDirtballs.Cast<ICmObjectOrSurrogate>()); Assert.That(dirtballs.Except(setDirtballs), Is.Empty, "some unexpected dirtballs were found"); Assert.That(setDirtballs.Except(dirtballs), Is.Empty, "some expected dirtballs were not found"); var setGoners = new HashSet<ICmObjectId>(expectedGoners); Assert.That(goners.Except(setGoners), Is.Empty, "some unexpected goners were found"); Assert.That(setGoners.Except(goners), Is.Empty, "some expected goners were not found"); }