public void ThirdLevel_IsCorrect() { var exception = new SingularityAggregateException("1", new List <Exception> { new SingularityAggregateException("21", new List <Exception> { new Exception("211"), new Exception("212"), new Exception("213"), }), new SingularityAggregateException("22", new List <Exception> { new Exception("221"), new Exception("222"), new Exception("223"), }) }); string[] lines = exception.Message.Split(new[] { Environment.NewLine }, StringSplitOptions.None); Assert.Equal("1", lines[0]); Assert.Equal(" 21", lines[1]); Assert.Equal(" 211", lines[2]); Assert.Equal(" 212", lines[3]); Assert.Equal(" 213", lines[4]); Assert.Equal(" 22", lines[5]); Assert.Equal(" 221", lines[6]); Assert.Equal(" 222", lines[7]); Assert.Equal(" 223", lines[8]); }
public void FirstLevel_IsCorrect() { var exception = new SingularityAggregateException("1", new List <Exception>()); string[] lines = exception.Message.Split(new[] { Environment.NewLine }, StringSplitOptions.None); Assert.Equal("1", lines[0]); }