public void ShouldNotGetTheLowestException() { var exception = new Exception(); var lowsetException = exception.GetLowestInnerException(); Assert.IsNotNull(lowsetException); Assert.IsInstanceOf(typeof(Exception), lowsetException); }
public void ShouldGetTheLowestException() { var formatException = new FormatException(); var argumentNullException = new ArgumentNullException("", formatException); var exception = new Exception("", argumentNullException); var lowsetException = exception.GetLowestInnerException(); Assert.IsNotNull(lowsetException); Assert.IsInstanceOf(typeof(FormatException), lowsetException); }