Пример #1
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();
     }
 }
Пример #2
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();
     }
 }
Пример #3
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();
     }
 }
Пример #4
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();
     }
 }
Пример #5
0
        public void InvalidApiKeyShouldBeFailureNotException()
        {
            HoundResult result = LogHound.LogException("NULL", new TestException("Hound-001", "Mary Shelley"));

            result.IsSuccess.ShouldBeFalse();
        }
Пример #6
0
 public void MultipleCallsShouldAllBeSuccess()
 {
     LogHound.LogException(_testApiKey, new Exception("An example of a general exception"));
     LogHound.LogException(_testApiKey, new Exception("An example of a general exception"));
 }