public async Task RaiseErrorShouldBeSuccessful() { IEventDestination target = new DogEvents(_testApiKey); HoundEvent data = GetTestEvent(); HoundResult eventResponse = await target.Publish(data); eventResponse.IsSuccess.ShouldBeTrue(); }
public async Task RaiseMetricShouldBeSuccessful() { IMetricDestination target = new DogMetrics(_testApiKey); HoundMetricCollection data = GetTestMetrics(); HoundResult eventResponse = await target.RaiseMetric(data); eventResponse.IsSuccess.ShouldBeTrue(); }
public void GeneralExceptionNotWrappedShouldBeSuccess() { try { throw new Exception("An example of a general exception"); } catch (Exception ex) { HoundResult result = LogHound.LogException(_testApiKey, ex); result.IsSuccess.ShouldBeTrue(); } }
public void TestWarningExceptionShouldBeSuccess() { try { throw new TestWarningException("Hound-001", "In a Glass Darkly"); } catch (HoundException ex) { HoundResult result = LogHound.LogException(_testApiKey, ex); result.IsSuccess.ShouldBeTrue(); } }
public void TestExceptionShouldBeSuccess() { try { throw new TestException("Hound-001", "Sheridan Le Fanu"); } catch (HoundException ex) { HoundResult result = LogHound.LogException(_testApiKey, ex); result.IsSuccess.ShouldBeTrue(); } }
public void TestExceptionWithTagsShouldBeSuccess() { try { throw new TestException("Hound-001", "Sheridan Le Fanu"); } catch (HoundException ex) { HoundResult result = LogHound.LogException(_testApiKey, ex, new List <string>() { "test", "exception" }); result.IsSuccess.ShouldBeTrue(); } }
public void InvalidApiKeyShouldBeFailureNotException() { HoundResult result = LogHound.LogException("NULL", new TestException("Hound-001", "Mary Shelley")); result.IsSuccess.ShouldBeFalse(); }