public void Log()
        {
            var mockContextLogger = new Mock <IContextExceptionLogger>();
            var logger            = new ErrorReportingExceptionLogger(mockContextLogger.Object);

            logger.Log(s_simpleContext);
            mockContextLogger.Verify(cl => cl.Log(s_simpleContext.Exception, It.IsAny <ExceptionLoggerContextWrapper>()));
        }
Esempio n. 2
0
        public void Log_Simple()
        {
            Mock <ReportErrorsServiceClient> mockClient = new Mock <ReportErrorsServiceClient>();

            mockClient.Setup(client => client.ReportErrorEvent(ProjectName, IsSimpleContext(), null));

            ErrorReportingExceptionLogger logger = GetLogger(mockClient.Object);

            logger.Log(SimpleContext);

            mockClient.VerifyAll();
        }