Example #1
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.Write("[");
     leftConstraint.WriteDescriptionTo(writer);
     writer.WriteConnector("AND");
     rightConstraint.WriteDescriptionTo(writer);
     writer.Write("]");
 }
Example #2
0
        /// <summary>
        /// Write description of this constraint
        /// </summary>
        /// <param name="writer">The MessageWriter to write to</param>
        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteExpectedValue(expected);

            if (tolerance != null)
            {
                writer.WriteConnector("+/-");
                writer.WriteExpectedValue(tolerance);
            }

//			if ( this.caseInsensitive )
//				writer.WriteModifier("ignoring case");
        }
Example #3
0
        /// <summary>
        /// Write description of this constraint
        /// </summary>
        /// <param name="writer">The MessageWriter to write to</param>
        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteExpectedValue(expected);

            if (comparer.Tolerance != null && !comparer.Tolerance.IsEmpty)
            {
                writer.WriteConnector("+/-");
                writer.WriteExpectedValue(comparer.Tolerance);
            }

            if (comparer.IgnoreCase)
            {
                writer.WriteModifier("ignoring case");
            }
        }
Example #4
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteExpectedValue(expected);
     if (tolerance != null && !tolerance.IsEmpty)
     {
         writer.WriteConnector("+/-");
         writer.WriteExpectedValue(tolerance.Value);
         if (tolerance.Mode != ToleranceMode.Linear)
         {
             writer.Write(" {0}", tolerance.Mode);
         }
     }
     if (comparer.IgnoreCase)
     {
         writer.WriteModifier("ignoring case");
     }
 }
Example #5
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);
        }
 /// <summary>
 /// Write a description for this contraint to a MessageWriter
 /// </summary>
 /// <param name="writer">The MessageWriter to receive the description</param>
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     left.WriteDescriptionTo(writer);
     writer.WriteConnector("and");
     right.WriteDescriptionTo(writer);
 }
Example #7
0
        /// <summary>
        /// Write description of this constraint
        /// </summary>
        /// <param name="writer">The MessageWriter to write to</param>
        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteExpectedValue( expected );

            if ( tolerance != null )
            {
                writer.WriteConnector("+/-");
                writer.WriteExpectedValue(tolerance);
            }

            //			if ( this.caseInsensitive )
            //				writer.WriteModifier("ignoring case");
        }
Example #8
0
 /// <summary>
 /// Write a description for this contraint to a MessageWriter
 /// </summary>
 /// <param name="writer">The MessageWriter to receive the description</param>
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     left.WriteDescriptionTo(writer);
     writer.WriteConnector("or");
     right.WriteDescriptionTo(writer);
 }
Example #9
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     leftConstraint.WriteDescriptionTo(writer);
     writer.WriteConnector("OR");
     rightConstraint.WriteDescriptionTo(writer);
 }