public void BeforeCallChangeToken() { using (var source = new CancellationTokenSource()) { var token = new CancellationTokenProxy(source.Token); var inputs = new object[1]; var expected = new OperationInfo { Token = token }; _manager .Setup(m => m.BeforeCall(_operation.FullName, null)) .Returns(expected); var actual = _sut.BeforeCall(_operationName, inputs); _manager.VerifyAll(); Assert.AreEqual(expected, actual); Assert.AreEqual(token, inputs[0]); } }
public void AfterCall(OperationInfo operation) { operation.IsNotNull(nameof(operation)); Manager.EndOperation(operation.Token.OperationId); }