public void MustNotFailIfActionsAreNull() { var sut = new DelegateOperation(null, null, null); var perform = sut.Perform(); var repeat = sut.Repeat(); var revert = sut.Revert(); Assert.AreEqual(OperationResult.Success, perform); Assert.AreEqual(OperationResult.Success, repeat); Assert.AreEqual(OperationResult.Success, revert); }
public void MustExecutePerformAction() { var performed = false; void perform() => performed = true; var sut = new DelegateOperation(perform); sut.Perform(); Assert.IsTrue(performed); }