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(); }
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); }
private void unhandledException( object sender, UnhandledExceptionEventArgs e) { var w = this.executor.Get <SetupMethodWebCommand>().Web; w.Run <LogEditor>(le => { LogHelpers.AddEntry(le, e); }, "Exceptions"); }