/// <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);
     }
 }
Beispiel #2
0
 /// <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>
 /// 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("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);
     }
 }
        /// <summary>
        /// Write a description of the constraint to a MessageWriter
        /// </summary>
        /// <param name="writer"></param>
        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");
            }
        }
        /// <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 );
		}
Beispiel #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(MessageWriter writer)
 {
     writer.WritePredicate("Path under or matching");
     writer.WriteExpectedValue(expectedPath);
 }
 /// <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 of the constraint to the specified writer
 /// </summary>
 public override void WriteDescriptionTo(MessageWriter writer)
 {
     writer.WritePredicate("type with attribute");
     writer.WriteExpectedValue(expectedType);
 }
 /// <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("same as");
     writer.WriteExpectedValue(expected);
 }
Beispiel #14
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 to");
     writer.WriteExpectedValue(expectedType);
 }
Beispiel #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 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);
 }
Beispiel #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("not");
     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" );
		}
Beispiel #19
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);
 }
 /// <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( "property " + name );
            if (baseConstraint != null)
            {
                if (baseConstraint is EqualConstraint)
                    writer.WritePredicate("equal to");
                baseConstraint.WriteDescriptionTo(writer);
            }
        }
 /// <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 to");
     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("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 )
		{
			writer.WritePredicate( "not" );
			baseConstraint.WriteDescriptionTo( writer );
		}