void Poison(OperationBase op) { op.Poison(device, () => { if (expected == null) { throw new InvalidOperationException( $"Executed an unexpected action of type {op.Operation} after the last step"); } throw new InvalidOperationException( $"Executed an unexpected action of type {op.Operation} expecting a {expected.Operation} at step {index}"); }); }
void UnPoison(OperationBase op) { op.Poison(device, () => {}); }
void UnPoison(OperationBase op) { op.Poison(device, () => {}); }
void Poison(OperationBase op) { op.Poison(device, () => { if (expected == null) { throw new InvalidOperationException( $"Executed an unexpected action of type {op.Operation} after the last step"); } throw new InvalidOperationException( $"Executed an unexpected action of type {op.Operation} expecting a {expected.Operation} at step {index}"); }); }