public MetricsCollectionAspect( IMethodInvocationRecorder methodInvocationRecorder, ITimeSource timeSource) { this._methodInvocationRecorder = methodInvocationRecorder; this._timeSource = timeSource; _debugSessionStartTimestampUs = _timeSource.GetTimestampUs(); }
public void SetUp() { methodInfo = MethodInfoUtil.GetMethodInfo <DummyObject>(x => x.SetValue(1)); mockInvocation = Substitute.For <IInvocation>(); mockInvocation.MethodInvocationTarget.Returns(methodInfo); fakeTimeSource = new MonotonicTimeSource(); mockMethodInvocationRecorder = Substitute.For <IMethodInvocationRecorder>(); metricsCollectionAspect = new MetricsCollectionAspect( mockMethodInvocationRecorder, fakeTimeSource); }