Exemple #1
0
        public void StripSpecifiedWrapperException()
        {
            _client.AddWrapperExceptions(typeof(WrapperException));

            WrapperException wrapper = new WrapperException(_exception);

            List <Exception> exceptions = _client.ExposeStripWrapperExceptions(wrapper).ToList();

            Assert.AreEqual(1, exceptions.Count);
            Assert.Contains(_exception, exceptions);
        }
Exemple #2
0
        public void StripMultipleWrapperExceptions()
        {
            _client.AddWrapperExceptions(typeof(WrapperException));

            WrapperException          wrapper  = new WrapperException(_exception);
            TargetInvocationException wrapper2 = new TargetInvocationException(wrapper);

            List <Exception> exceptions = _client.ExposeStripWrapperExceptions(wrapper2).ToList();

            Assert.AreEqual(1, exceptions.Count);
            Assert.Contains(_exception, exceptions);
        }