public void IsTopLevelValid() { var notification = new Notification(); var child = new Notification(); notification.AddChild("something", child); child.RegisterMessage("f1", "bad", Severity.Error); notification.IsTopLevelValid().ShouldBeTrue(); notification.RegisterMessage("f2", "not bad", Severity.Warning); notification.IsTopLevelValid().ShouldBeTrue(); notification.RegisterMessage("f2", "really bad", Severity.Error); notification.IsTopLevelValid().ShouldBeFalse(); }