Пример #1
0
        public async Task RaiseErrorShouldBeSuccessful()
        {
            IEventDestination target = new DogEvents(_testApiKey);
            HoundEvent        data   = GetTestEvent();

            HoundResult eventResponse = await target.Publish(data);

            eventResponse.IsSuccess.ShouldBeTrue();
        }
Пример #2
0
        public async Task RaiseMetricShouldBeSuccessful()
        {
            IMetricDestination    target = new DogMetrics(_testApiKey);
            HoundMetricCollection data   = GetTestMetrics();

            HoundResult eventResponse = await target.RaiseMetric(data);

            eventResponse.IsSuccess.ShouldBeTrue();
        }
Пример #3
0
 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();
     }
 }
Пример #4
0
 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();
     }
 }
Пример #5
0
 public void TestExceptionShouldBeSuccess()
 {
     try
     {
         throw new TestException("Hound-001", "Sheridan Le Fanu");
     }
     catch (HoundException ex)
     {
         HoundResult result = LogHound.LogException(_testApiKey, ex);
         result.IsSuccess.ShouldBeTrue();
     }
 }
Пример #6
0
 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();
     }
 }
Пример #7
0
        public void InvalidApiKeyShouldBeFailureNotException()
        {
            HoundResult result = LogHound.LogException("NULL", new TestException("Hound-001", "Mary Shelley"));

            result.IsSuccess.ShouldBeFalse();
        }