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.IsTrue(exceptions.Contains(_exception)); }
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.IsTrue(exceptions.Contains(_exception)); }
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.IsTrue(exceptions.Contains(_exception)); }
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.IsTrue(exceptions.Contains(_exception)); }