public override bool HasChanges() { var rval = base.HasChanges(); rval = (rval | Failures.Count((f) => f.HasChanges()) > 0); return(rval); }
/// <summary> /// Returns a <see cref="System.String" /> that represents this instance. /// </summary> /// <returns> A <see cref="System.String" /> that represents this instance. </returns> public override string ToString() { var failed = Evaluations.OfType <FailedEvaluation>() .Select(e => " " + e.ToString()) .Where(msg => !string.IsNullOrWhiteSpace(msg)); var passed = Evaluations.OfType <SuccessfulEvaluation>() .Select(e => " " + e.ToString()) .Where(msg => !string.IsNullOrWhiteSpace(msg)); return ($"{Failures.Count()} failed (out of {Evaluations.Count()} evaluations)\n Failed:\n{string.Join(Environment.NewLine, failed)}\n Passed:\n{string.Join(Environment.NewLine, passed)}"); }