Beispiel #1
0
        public void CallProceedOnce()
        {
            // Arrange
            var loggerMock     = new Mock <ILogger>();
            var writerMock     = new Mock <IWriter>();
            var invocationMock = new Mock <IInvocation>();

            invocationMock.Setup(i => i.Proceed());

            LogErrorInterceptor logErrorInterceptor = new LogErrorInterceptor(loggerMock.Object, writerMock.Object);

            // Act
            logErrorInterceptor.Intercept(invocationMock.Object);

            // Assert
            invocationMock.Verify(i => i.Proceed(), Times.Once());
        }