public void CancelMethod() { var mockMyFx = new Mock<IIdentNodeCoresFx>(); ISetSimpleFx setter = _element as ISetSimpleFx; using (RecordExpectations recorder = RecorderManager.StartRecording()) { recorder.DefaultBehavior.Strict = StrictFlags.ArbitraryMethodsAllowed; recorder.ExpectAndReturn(_element.Fx, mockMyFx).RepeatAlways(); mockMyFx.CancelAsync(); } _element.Cancel(); MockManager.Verify(); }