public void FlattenA3DeepNotification() { Notification notification = new Notification(); notification.RegisterMessage("f1", "hello", Severity.Error); Notification child = new Notification(); child.RegisterMessage("f3", "something", Severity.Warning); notification.AddChild("f2", child); Notification grandchild = new Notification(); grandchild.RegisterMessage("f4", "bad", Severity.Error); child.AddChild("f5", grandchild); Notification flat = notification.Flatten(); flat.AllMessages.Length.ShouldEqual(3); }