public void Perform() { CollectionDataMock.BackToRecord(); CollectionDataMock.Expect(mock => mock.Remove(_removedRelatedObject)).Return(true); CollectionDataMock.Replay(); _command.Perform(); CollectionDataMock.VerifyAllExpectations(); CollectionMockEventReceiver.AssertWasNotCalled(mock => mock.Removing()); CollectionMockEventReceiver.AssertWasNotCalled(mock => mock.Removed()); Assert.That(CollectionEndPoint.HasBeenTouched, Is.True); }
public void Perform() { CollectionDataMock.BackToRecord(); CollectionDataMock.Expect(mock => mock.Clear()); CollectionDataMock.Replay(); Assert.That(CollectionEndPoint.HasBeenTouched, Is.False); _command.Perform(); CollectionDataMock.VerifyAllExpectations(); CollectionMockEventReceiver.AssertWasNotCalled(mock => mock.Deleting()); CollectionMockEventReceiver.AssertWasNotCalled(mock => mock.Deleted()); Assert.That(CollectionEndPoint.HasBeenTouched, Is.True); }