/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { var description = new DescriptionStructureHelper(); var filterExpression = description.GetFilterExpression(Request.GetAllFilters()); if (Expected.Count() == 1) { writer.WritePredicate(string.Format("find a {0} named '{1}' contained {2}", description.GetTargetExpression(Request.Target), Expected.First(), filterExpression)); } else { var expectationExpression = new StringBuilder(); foreach (string item in Expected) expectationExpression.AppendFormat("<{0}>, ", item); expectationExpression.Remove(expectationExpression.Length - 2, 2); writer.WritePredicate(string.Format("find the {0} named '{1}' contained {2}", description.GetTargetPluralExpression(Request.Target), expectationExpression.ToString(), filterExpression)); } }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("just value"); if (_valueConstraint is EqualConstraint) writer.WritePredicate("equal to"); _valueConstraint.WriteDescriptionTo(writer); }
/// <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(MessageWriter writer) { writer.WritePredicate("property " + name); if (baseConstraint != null) { if (baseConstraint is EqualConstraint) writer.WritePredicate("equal to"); baseConstraint.WriteDescriptionTo(writer); } }
/// <summary> /// Writes a description of the attribute to the specified writer. /// </summary> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("attribute " + expectedType.FullName); if (baseConstraint != null) { if (baseConstraint is EqualConstraint) writer.WritePredicate("equal to"); baseConstraint.WriteDescriptionTo(writer); } }
/// <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(MessageWriter writer) { writer.WritePredicate("property " + name); if (baseConstraint != null) { if (baseConstraint is EqualConstraint) { writer.WritePredicate("equal to"); } baseConstraint.WriteDescriptionTo(writer); } }
/// <summary> /// Writes a description of the attribute to the specified writer. /// </summary> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("attribute " + expectedType.FullName); if (baseConstraint != null) { if (baseConstraint is EqualConstraint) { writer.WritePredicate("equal to"); } baseConstraint.WriteDescriptionTo(writer); } }
/// <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.WriteActualValue(actual); writer.WritePredicate(string.Format("The formatted value of each cell matchs the")); if (!string.IsNullOrEmpty(regex)) { writer.WritePredicate(" regex pattern "); writer.WritePredicate(regex); } }
/// <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.WriteActualValue(actual); writer.WritePredicate(string.Format("On perspective \"{0}\", the {1} of \"{2}\" match the" , Request.Perspective , Request.Function.ToLower() , Request.Path)); if (!string.IsNullOrEmpty(regex)) { writer.WritePredicate("regex pattern"); writer.WritePredicate(regex); } }
/// <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(MessageWriter writer) { writer.WritePredicate("String matching"); writer.WriteExpectedValue(this.expected); if (this.caseInsensitive) writer.WriteModifier("ignoring case"); }
/// <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(MessageWriter writer) { if (baseConstraint == null) writer.WritePredicate("an exception"); else baseConstraint.WriteDescriptionTo(writer); }
/// <summary> /// Writes the description to a MessageWriter /// </summary> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("value matching"); writer.Write(predicate.Method.Name.StartsWith("<") ? "lambda expression" : predicate.Method.Name); }
/// <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(MessageWriter writer) { writer.WritePredicate("Property \"" + name + "\""); if (baseConstraint != null) { baseConstraint.WriteDescriptionTo(writer); } }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate("Execution of the query doesn't match the expected result"); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); DisplayDifferences(writer, result); }
public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { if (Configuration.FailureReportProfile.Format == FailureReportFormat.Json) { return; } writer.WritePredicate($"no rows validate the predicate '{filter.Describe()}'."); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { switch(expectedCount) { case 0: writer.WritePredicate("no item"); break; case 1: writer.WritePredicate("exactly one item"); break; default: writer.WritePredicate("exactly " + expectedCount.ToString() + " items"); break; } baseConstraint.WriteDescriptionTo(writer); }
/// <summary> /// /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { var sb = new System.Text.StringBuilder(); sb.AppendLine("Execution of the query is slower than expected"); sb.AppendFormat("Maximum expected was {0}ms", maxTimeMilliSeconds); writer.WritePredicate(sb.ToString()); }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate("Execution of the query doesn't match the expected result"); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(Failure.RenderCompared()); }
public override void WriteDescriptionTo(MessageWriter writer) { switch (expectedCount) { case 0: writer.WritePredicate("no item"); break; case 1: writer.WritePredicate("exactly one item"); break; default: writer.WritePredicate("exactly " + expectedCount + " items"); break; } baseConstraint.WriteDescriptionTo(writer); }
public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { var sb = new System.Text.StringBuilder(); sb.AppendLine(); sb.AppendFormat("Successful execution of the etl."); sb.AppendLine(); writer.WritePredicate(sb.ToString()); }
/// <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 ordered {3}{4}" , Request.Perspective , Request.Function.ToLower() , Request.Path , Comparer == null ? "specifically" : ((IComparerWithLabel)Comparer).Label , reversed ? "(descending)" : string.Empty)); }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate("Execution of the query returns duplicated rows"); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(failure.RenderDuplicated()); }
/// <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(MessageWriter writer) { writer.WritePredicate("String starting with"); writer.WriteExpectedValue(MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0)); if (this.caseInsensitive) { writer.WriteModifier("ignoring case"); } }
/// <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(MessageWriter writer) { writer.WritePredicate("String matching"); writer.WriteExpectedValue(this.expected); if (this.caseInsensitive) { writer.WriteModifier("ignoring case"); } }
/// <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(MessageWriter writer) { if (baseConstraint == null) { writer.WritePredicate("an exception"); } else { baseConstraint.WriteDescriptionTo(writer); } }
public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { var sb = new System.Text.StringBuilder(); sb.AppendLine("Query is not syntactically correct."); foreach (var failure in parserResult.Errors) { sb.AppendLine(failure); } writer.WritePredicate(sb.ToString()); }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate(string.Format("On perspective \"{0}\", {1} " , Request.Perspective , GetPredicate())); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(Failure.RenderAnalysis()); }
public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { var sb = new System.Text.StringBuilder(); sb.Append("execution of the query returns a row-count"); if (child is NUnitCtr.EqualConstraint) { sb.Append(" equal to"); } writer.WritePredicate(sb.ToString()); child.WriteDescriptionTo(writer); }
/// <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 WriteMessageTo(NUnitCtr.MessageWriter writer) { if (Configuration?.FailureReportProfile.Format == FailureReportFormat.Json) writer.Write(failure.RenderMessage()); else { writer.WritePredicate("Execution of the query returns duplicated rows"); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(failure.RenderAnalysis()); } }
public override void WriteDescriptionTo(MessageWriter writer) { if (propertyName == null) { writer.Write("collection ordered"); } else { writer.WritePredicate("collection ordered by"); writer.WriteExpectedValue(propertyName); } if (descending) { writer.WriteModifier("descending"); } }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { if (Configuration.FailureReportProfile.Format == FailureReportFormat.Json) { writer.Write(Failure.RenderMessage()); } else { writer.WritePredicate(Failure.RenderPredicate()); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(Failure.RenderAnalysis()); } }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { if (Configuration.FailureReportProfile.Format == FailureReportFormat.Json) { writer.Write(Failure.RenderMessage()); } else { writer.WritePredicate("Execution of the query doesn't match the expected result"); writer.WriteLine(); writer.WriteLine(); base.WriteMessageTo(writer); writer.WriteLine(); writer.WriteLine(Failure.RenderAnalysis()); } }
public override void WriteMessageTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate("The result of the query's execution doesn't validate the list of expressions."); var totalFailed = evaluationResults.Aggregate <RowEvaluationResult, int>(0, (total, r) => total += r.CountExpressionValidationFailed()); if (totalFailed > 1) { writer.WriteLine("{0} expressions are not matching with the expected result.", totalFailed); } else { writer.WriteLine("One expression is not matching with the expected result."); } base.WriteMessageTo(writer); DisplayDifferences(writer, evaluationResults); }
/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { if (Command != null) { var description = new DescriptionStructureHelper(); var filterExpression = description.GetFilterExpression(Command.Description.Filters); var nextTargetExpression = description.GetNextTargetPluralExpression(Command.Description.Target); var expectationExpression = new StringBuilder(); foreach (string item in Expected) expectationExpression.AppendFormat("<{0}>, ", item); expectationExpression.Remove(expectationExpression.Length - 2, 2); writer.WritePredicate(string.Format("All {0} are defined in the set '{1}' for {2}", nextTargetExpression, expectationExpression.ToString(), filterExpression)); } }
/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { if (Request != null) { var description = new DescriptionStructureHelper(); var filterExpression = description.GetFilterExpression(Request.GetAllFilters()); var nextTargetExpression = description.GetTargetPluralExpression(Request.Target); var expectationExpression = new StringBuilder(); foreach (string item in Expected) expectationExpression.AppendFormat("<{0}>, ", item); expectationExpression.Remove(expectationExpression.Length - 2, 2); writer.WritePredicate(string.Format("find an exact list of {0} named '{1}' contained {2}", nextTargetExpression, expectationExpression, filterExpression)); } }
public override void WriteDescriptionTo(NUnitCtr.MessageWriter writer) { writer.WritePredicate("no rows validate the predicate"); }
/// <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( MessageWriter writer ) { writer.WritePredicate( "not" ); baseConstraint.WriteDescriptionTo( writer ); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate( "subset of" ); writer.WriteExpectedValue(expected); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("equivalent to"); writer.WriteExpectedValue(expected); }
/// <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(MessageWriter writer) { writer.WritePredicate("A subdirectory of"); writer.WriteExpectedValue(parentDir.FullName); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("equivalent XML structure to"); writer.WriteExpectedValue(expected.OuterXml); }
/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { var description = new DescriptionDataTypeHelper(); var filterExpression = description.GetFilterExpression(Command.Description.Filters.Where(f => f.Target != Command.Description.Target)); var targetExpression = description.GetTargetExpression(Command.Description.Target); var captionExpression = Command.Description.Filters.Single(f => f.Target == Command.Description.Target).Caption; writer.WritePredicate(string.Format("the type of {0} '{1}' ({2}) is '{3}'" , targetExpression , captionExpression , filterExpression , expected.ToString())); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("equivalent to"); writer.WriteExpectedValue(expected); }
/// <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(MessageWriter writer) { writer.WritePredicate( "Property \"" + name + "\"" ); if ( baseConstraint != null ) baseConstraint.WriteDescriptionTo( writer ); }
/// <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(MessageWriter writer) { writer.WritePredicate("String starting with"); writer.WriteExpectedValue( MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0) ); if ( this.caseInsensitive ) writer.WriteModifier( "ignoring case" ); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate(String.Format("An IProperty with an empty {0} region", this.accessorText)); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("A method with an empty BodyRegion"); }
/// <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(MessageWriter writer) { writer.WritePredicate("Path under or matching"); writer.WriteExpectedValue(expectedPath); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate(CommonExtensions.FormatInvariant("Calls to {0} should be null guarded.", this.state.ToString())); }
/// <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(MessageWriter writer) { writer.WritePredicate("greater than or equal to"); writer.WriteExpectedValue(expected); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("dictionary containing key "); writer.WriteExpectedValue(expected); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("collection not containing"); writer.WriteExpectedValue(expected); }
/// <summary> /// Writes the description of the constraint to the specified writer /// </summary> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("type with attribute"); writer.WriteExpectedValue(expectedType); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("A fake object wrapper."); }
/// <summary> /// Write a descripton of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("collection containing"); writer.WriteExpectedValue(expected); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer">The MessageWriter to use</param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("assignable from"); writer.WriteExpectedValue(expectedType); }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("subset of"); writer.WriteExpectedValue(expected); }
public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("build target description depending on "); writer.WriteExpectedValue(_dependency); }
/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { if (Command != null) { var description = new DescriptionStructureHelper(); var filterExpression = description.GetFilterExpression(Command.Description.Filters.Where(f => f.Target != Command.Description.Target)); var notExpression = description.GetNotExpression(true); var targetExpression = description.GetTargetExpression(Command.Description.Target); var captionExpression = Expected; writer.WritePredicate(string.Format("find {0} {1} named '{2}' {3}" , notExpression , targetExpression , captionExpression , filterExpression)); } }
/// <summary> /// Write a description of this constraint to a MessageWriter /// </summary> /// <param name="writer">The MessageWriter to use</param> public override void WriteDescriptionTo(MessageWriter writer) { writer.WritePredicate("instance of"); writer.WriteExpectedValue(expectedType); }