Exemplo n.º 1
0
 /// <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());
 }
Exemplo n.º 2
0
 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());
 }
 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());
 }
Exemplo n.º 4
0
        /// <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)
 {
     writer.WritePredicate(string.Format("On perspective \"{0}\", {1} "
                                                     , Request.Perspective
                                                     , GetPredicate()));
     writer.WriteLine();
     writer.WriteLine();
     base.WriteMessageTo(writer);
     writer.WriteLine();
     writer.WriteLine(Failure.RenderCompared());
 }
Exemplo n.º 6
0
 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());
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        /// <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);
            }
        }
Exemplo n.º 9
0
 /// <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));
 }
Exemplo n.º 10
0
        /// <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);
            }
        }
Exemplo n.º 11
0
 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);
 }
Exemplo n.º 12
0
 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);
 }