Exemplo n.º 1
0
        public void ExceptionInsideSendingMessageHAndlerDoesNotCrash()
        {
            FakeRaygunClient client = new FakeRaygunClient();
              client.SendingMessage += (sender, args) =>
              {
            throw new Exception("Oops...");
              };

              Assert.That(() => client.ExposeOnSendingMessage(new RaygunMessage()), Throws.Nothing);
              Assert.IsTrue(client.ExposeOnSendingMessage(new RaygunMessage()));
        }
Exemplo n.º 2
0
        public void ExceptionInsideSendingMessageHAndlerDoesNotCrash()
        {
            FakeRaygunClient client = new FakeRaygunClient();

            client.SendingMessage += (sender, args) =>
            {
                throw new Exception("Oops...");
            };

            Assert.That(() => client.ExposeOnSendingMessage(new RaygunMessage()), Throws.Nothing);
            Assert.IsTrue(client.ExposeOnSendingMessage(new RaygunMessage()));
        }
Exemplo n.º 3
0
 public void NoHandlerSendsAll()
 {
     Assert.IsTrue(_client.ExposeOnSendingMessage(_client.ExposeBuildMessage(_exception)));
 }