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 && !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");
            }
        }