public override void WriteActualValueTo(NUnitCtr.MessageWriter writer) { writer.WriteActualValue(string.Format("{0}ms", Result.TimeElapsed.TotalMilliseconds)); }
public override void WriteActualValueTo(NUnitCtr.MessageWriter writer) { if (performanceResult.IsTimeOut) writer.WriteActualValue(string.Format("query interrupted after {0}ms (timeout)", performanceResult.TimeOut)); else writer.WriteActualValue(string.Format("{0}ms", performanceResult.TimeElapsed.TotalMilliseconds)); }
/// <summary> /// Write the constraint description to a MessageWriter /// </summary> /// <param name="writer">The writer on which the description is displayed</param> public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate(string.Format("On perspective \"{0}\", the {1} of \"{2}\" are " , Request.Perspective , Request.Function.ToLower() , Request.Path)); if (exactly.HasValue) { writer.WritePredicate("exactly"); writer.WriteExpectedValue(exactly.Value); return; } if (moreThan.HasValue && lessThan.HasValue) { writer.WritePredicate("between"); writer.WriteExpectedValue(moreThan.Value); writer.WriteConnector("and"); writer.WriteExpectedValue(lessThan.Value); return; } if (moreThan.HasValue) { writer.WritePredicate("more than"); writer.WriteExpectedValue(moreThan.Value); return; } if (lessThan.HasValue) { writer.WritePredicate("less than"); writer.WriteExpectedValue(lessThan.Value); return; } writer.WriteActualValue(((ICollection)actual).Count); }
public override void WriteActualValueTo(NUnitCtr.MessageWriter writer) { writer.WriteActualValue(string.Format("Failure during execution of the etl: {0}", Result.Message)); }
public override void WriteActualValueTo(NUnitCtr.MessageWriter writer) { if (actual is MemberResult && ((MemberResult)actual).Count() > 0 && ((MemberResult)actual).Count() <= 15) writer.WriteActualValue((IEnumerable)actual); else if (actual is MemberResult && ((MemberResult)actual).Count() > 0 && ((MemberResult)actual).Count() > 15) { writer.WriteActualValue(((IEnumerable<NBi.Core.Analysis.Member.Member>)actual).Take(10)); writer.WriteActualValue(string.Format(" ... and {0} others.", ((MemberResult)actual).Count() - 10)); } else writer.WriteActualValue(new NothingFoundMessage()); }