public void PersistentEntityReferencesShouldNotBeDisconnected() { CreatePartDoc(doc => { var feature = SpecHelper.InsertDummyBody(doc); var body = doc.GetPersistentEntityReference(doc.GetBodiesTs().Single()); DisconnectEntity(doc, body); new Action(() => body().GetBodyBoxTs()).ShouldNotThrow <COMException>(); return(Disposable.Empty); }); }
public void EntityReferencesMightBeDisconnected() { CreatePartDoc(doc => { var feature = SpecHelper.InsertDummyBody(doc); var body = doc.GetBodiesTs().Single(); DisconnectEntity(doc, () => body); new Action(() => body.GetBodyBoxTs()).ShouldThrow <COMException>().Which.Message.Should().Contain("disconnected"); return(Disposable.Empty); }); }