Example #1
0
            public void Calls_editor_AddEntry()
            {
                const string errorType = DefaultEntryTypes.Error;

                LogHelpers.AddEntry(
                    this.editor,
                    this.e);

                A
                .CallTo(() => this.editor.AddEntry(
                            errorType,
                            A <IEnumerable <string> > .That.Contains(
                                this.e.Message)))
                .MustHaveHappened();
                A
                .CallTo(() => this.editor.AddEntry(
                            errorType,
                            A <IEnumerable <string> > .That.Contains(
                                this.e.GetType().ToString())))
                .MustHaveHappened();
                A
                .CallTo(() => this.editor.AddEntry(
                            errorType,
                            A <IEnumerable <string> > .That.Contains(
                                this.inner.GetType().ToString())))
                .MustHaveHappened();
                A
                .CallTo(() => this.editor.AddEntry(
                            errorType,
                            A <IEnumerable <string> > .That.Contains(
                                this.inner.Message)))
                .MustHaveHappened();
            }
Example #2
0
        protected virtual void handleException(
            object sender,
            UnhandledExceptionEventArgs e)
        {
            var w = this.executor?.Get <SetupMethodWebCommand>()?.W;

            w?.Run <LogEditor>(le =>
            {
                LogHelpers.AddEntry(le, e);
            },
                               LogNames.Exceptions);
        }
Example #3
0
        private void unhandledException(
            object sender,
            UnhandledExceptionEventArgs e)
        {
            var w = this.executor.Get <SetupMethodWebCommand>().Web;

            w.Run <LogEditor>(le =>
            {
                LogHelpers.AddEntry(le, e);
            },
                              "Exceptions");
        }