Exemplo n.º 1
0
        public void FaultyPayloadTransformationTest()
        {
            this.Reset();

            RollbarConfig config = this.ProvideLiveRollbarConfig() as RollbarConfig;

            config.Transform = delegate(Payload payload)
            {
                throw new Exception("Buggy transform delegate!");
            };

            using (IRollbar rollbar = this.ProvideDisposableRollbar())
            {
                rollbar.Configure(config);

                rollbar.Critical("This message's Transform will fail!");

                this.VerifyInstanceOperational(rollbar);
                // one more extra sanity check:
                Assert.AreEqual(0, RollbarQueueController.Instance.GetTotalPayloadCount());
            }

            this.Reset();
        }