示例#1
0
        public void RemoveWrapperExceptions()
        {
            _client.RemoveWrapperExceptions(typeof(TargetInvocationException));

            TargetInvocationException wrapper = new TargetInvocationException(_exception);

            var exceptions = _client.ExposeStripWrapperExceptions(wrapper);

            Assert.AreEqual(1, exceptions.Count());
            Assert.AreEqual("System.Reflection.TargetInvocationException", exceptions.ElementAt(0).GetType().FullName);
            Assert.AreEqual("System.NullReferenceException", exceptions.ElementAt(0).InnerException.GetType().FullName);
        }