Exemplo n.º 1
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");
        }
Exemplo n.º 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 (comparer.Tolerance != null && !comparer.Tolerance.IsEmpty)
            {
                writer.WriteConnector("+/-");
                writer.WriteExpectedValue(comparer.Tolerance);
            }

            if (comparer.IgnoreCase)
            {
                writer.WriteModifier("ignoring case");
            }
        }
Exemplo n.º 3
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(MessageWriter writer)
 {
     writer.WritePredicate("String matching");
     writer.WriteExpectedValue(this.expected);
     if (this.caseInsensitive)
         writer.WriteModifier("ignoring case");
 }
Exemplo n.º 4
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     //WritePredicateTo(writer);
     writer.WriteExpectedValue(expected);
     //if (ignoreCase)
     //    writer.Write(" ignoring case");
 }
Exemplo n.º 5
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     //WritePredicateTo(writer);
     writer.WriteExpectedValue(expected);
     //if (ignoreCase)
     //    writer.Write(" ignoring case");
 }
Exemplo n.º 6
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");
     }
 }
Exemplo n.º 7
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(MessageWriter writer)
 {
     writer.WritePredicate("String starting with");
     writer.WriteExpectedValue(MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0));
     if (this.caseInsensitive)
     {
         writer.WriteModifier("ignoring case");
     }
 }
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(MessageWriter writer)
 {
     writer.WritePredicate("String matching");
     writer.WriteExpectedValue(this.expected);
     if (this.caseInsensitive)
     {
         writer.WriteModifier("ignoring case");
     }
 }
Exemplo n.º 9
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");
        }
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.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);
        }
Exemplo n.º 11
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     if (Same)
     {
         writer.WriteExpectedValue(expected1);
     }
     else
     {
         writer.WritePredicate("To be between");
         writer.WriteExpectedValue(expected1);
         writer.Write(" and ");
         writer.WriteExpectedValue(expected2);
     }
 }
Exemplo n.º 12
0
 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");
     }
 }
Exemplo n.º 13
0
 /// <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.WriteExpectedValue("<nothing>");
		}
Exemplo n.º 15
0
 /// <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);
 }
 /// <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);
 }
Exemplo n.º 17
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(MessageWriter writer)
 {
     writer.WritePredicate("Property \"" + name + "\" equal 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("headers containing");
     writer.WriteExpectedValue(_expectedItems);
 }
Exemplo n.º 20
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(MessageWriter writer)
 {
     writer.WritePredicate( "Property \"" + name + "\" equal to" );
     writer.WriteExpectedValue( expected );
 }
Exemplo n.º 21
0
        public override void WriteDescriptionTo(MessageWriter writer)
        {
            writer.WriteExpectedValue(_expectedValue);

            if (_context != null)
                writer.WriteMessageLine("In " + _context);
        }
Exemplo n.º 22
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("build target description depending on ");
     writer.WriteExpectedValue(_dependency);
 }
Exemplo n.º 23
0
 /// <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);
 }
Exemplo n.º 24
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.Write("Link header containing link with ");
     writer.WriteExpectedValue("rel=" + _expectedRel + " and location=<"+_expectedUri+ ">");
 }
Exemplo n.º 25
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(MessageWriter writer)
 {
     writer.WritePredicate("A subdirectory of");
     writer.WriteExpectedValue(parentDir.FullName);
 }
Exemplo n.º 26
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteExpectedValue( "same color as " + expectedColor );
 }
Exemplo n.º 27
0
		public override void WriteDescriptionTo(MessageWriter writer)
		{
			writer.WritePredicate("equivalent XML structure to");
			writer.WriteExpectedValue(expected.OuterXml);
		}
Exemplo n.º 28
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteExpectedValue("same color as " + expectedColor);
 }
Exemplo n.º 29
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("assignable to");
     writer.WriteExpectedValue(expectedType);
 }
Exemplo n.º 30
0
 /// <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 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);
 }
Exemplo n.º 32
0
 /// <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("Path under or matching");
     writer.WriteExpectedValue(expectedPath);
 }
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("dictionary containing key ");
     writer.WriteExpectedValue(expected);
 }
        /// <summary>
        /// Write a description of the constraint to a MessageWriter
        /// </summary>
        /// <param name="writer"></param>
        public override void WriteDescriptionTo(MessageWriter writer)
        {
            if (Request != null)
            {
                writer.WritePredicate(string.Format("On perspective \"{0}\", {1} "
                                                            , Request.Perspective
                                                            , GetPredicate()));
                writer.WriteExpectedValue(ExpectedItems);

                var info = new ListComparisonFormatter()
                    .Format
                    (
                        new ListComparer()
                            .Compare
                            (
                                ((MemberResult)actual).ToCaptions()
                                , ExpectedItems
                                , GetComparisonType()
                            ).Sample()
                    );

                writer.WriteLine(info.ToString());
            }
        }
Exemplo n.º 36
0
 /// <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);
 }
Exemplo n.º 37
0
 /// <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);
 }
Exemplo n.º 38
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     if (actual == null)
     {
         writer.WriteMessageLine("Actual value does not have a meta table.");
     }
     else if (_typeMismatch)
     {
         writer.WriteMessageLine("Meta entry type doesn't match.");
         writer.WriteExpectedValue(_expectedEntry.EntryType);
         writer.WriteActualValue(_actualEntry.EntryType);
     }
     else
     {
         writer.WriteMessageLine(
             "actual meta entry {0} should match expected entry {1}", _actualEntry,
             _expectedEntry);
     }
 }
Exemplo n.º 39
0
 /// <summary>
 /// Write the description of this constraint to a MessageWriter
 /// </summary>
 /// <param name="writer">The MessageWriter to use</param>
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteExpectedValue(expectedType);
 }
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("collection not containing");
     writer.WriteExpectedValue(expected);
 }
Exemplo n.º 41
0
 /// <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 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("less than or equal to");
     writer.WriteExpectedValue(expected);
 }
Exemplo n.º 43
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(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.WriteExpectedValue("some value");
		}
Exemplo n.º 45
0
 /// <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);
 }
Exemplo n.º 46
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);
 }
Exemplo n.º 47
0
 /// <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);
 }
Exemplo n.º 48
0
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WriteExpectedValue(String.Format("\ndigraph G {{\n  ...\n  {0}\n  ...\n}}", expectedLine));
 }