Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SmocksContext" /> class.
        /// </summary>
        /// <param name="setupManager">The setup manager.</param>
        /// <param name="invocationTracker">The invocation tracker.</param>
        /// <param name="eventInterceptor">The event interceptor.</param>
        internal SmocksContext(ISetupManager setupManager, IInvocationTracker invocationTracker, EventInterceptor eventInterceptor)
        {
            ArgumentChecker.NotNull(setupManager, nameof(setupManager));
            ArgumentChecker.NotNull(invocationTracker, nameof(invocationTracker));
            ArgumentChecker.NotNull(eventInterceptor, nameof(eventInterceptor));

            _setupManager      = setupManager;
            _invocationTracker = invocationTracker;
            _eventInterceptor  = eventInterceptor;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Interceptor" /> class.
        /// </summary>
        /// <param name="setupMatcher">The setup matcher.</param>
        /// <param name="invocationTracker">The invocation tracker.</param>
        /// <param name="expressionHelper">The expression helper.</param>
        internal Interceptor(ISetupMatcher setupMatcher, IInvocationTracker invocationTracker,
                             IExpressionHelper expressionHelper)
        {
            ArgumentChecker.NotNull(setupMatcher, () => setupMatcher);
            ArgumentChecker.NotNull(invocationTracker, () => invocationTracker);
            ArgumentChecker.NotNull(expressionHelper, () => expressionHelper);

            _setupMatcher      = setupMatcher;
            _invocationTracker = invocationTracker;
            _expressionHelper  = expressionHelper;
        }