コード例 #1
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");
 }
コード例 #2
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");
     }
 }
コード例 #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 starting with");
     writer.WriteExpectedValue(MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0));
     if (this.caseInsensitive)
     {
         writer.WriteModifier("ignoring case");
     }
 }
コード例 #4
0
ファイル: EqualConstraint.cs プロジェクト: pmq20/mono_forked
        /// <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");
            }
        }
コード例 #5
0
ファイル: EqualConstraint.cs プロジェクト: runegri/MobiTest
        /// <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");
            }
        }
コード例 #6
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");
     }
 }
コード例 #7
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");
     }
 }
コード例 #8
0
ファイル: StringConstraints.cs プロジェクト: gezidan/ZYSOCKET
        /// <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" );
		}
コード例 #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");
        }