public void DataServiceFailure() { DataServiceFailureEvent.Fire("test", new Exception("test exception")); Assert.AreEqual(1, log.Entries.Count - startCount); string expected = "test Exception: System.Exception: test exception"; string actual = log.Entries[log.Entries.Count - 1].Message; Assert.AreEqual(expected, actual); }
/// <summary> /// <para>Publish an instrumentation event that indicates there was an error while attempting to create a provider.</para> /// </summary> /// <param name="name"><para>The name of the configuration object.</para></param> /// <param name="e"><para>The <see cref="Exception"/> to publish.</para></param> protected override void PublishFailureEvent(string name, Exception e) { string errorMsg = SR.ExceptionMessageCreateServiceFailure(name); DataServiceFailureEvent.Fire(errorMsg, e); }
private void FireDataServiceFailureEvent() { DataServiceFailureEvent.Fire(testMessage, new Exception(testMessage)); }