Esempio n. 1
0
        /// <summary>
        ///     Write the internalActual value for a failing constraint test to a
        ///     MessageWriter. The default implementation simply writes
        ///     the raw value of internalActual, leaving it to the writer to
        ///     perform any formatting.
        /// </summary>
        /// <param name="writer">The writer on which the internalActual value is displayed</param>
        public override void WriteActualValueTo(MessageWriter writer)
        {
            var dir = internalActual as DirectoryInfo;

            if (dir == null)
            {
                base.WriteActualValueTo(writer);
            }
            else
            {
                writer.WriteActualValue(dir);
                writer.Write(" with {0} files and {1} directories", files, subdirs);
            }
        }
Esempio n. 2
0
 /// <summary>
 ///     Write the internalActual value for a failing constraint test to a
 ///     MessageWriter. The default implementation simply writes
 ///     the raw value of internalActual, leaving it to the writer to
 ///     perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the internalActual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     if (caughtException == null)
     {
         writer.Write("no exception thrown");
     }
     else if (baseConstraint != null)
     {
         baseConstraint.WriteActualValueTo(writer);
     }
     else
     {
         writer.WriteActualValue(caughtException);
     }
 }
Esempio n. 3
0
 /// <summary>
 ///     Write the internalActual value for a failing constraint test to a
 ///     MessageWriter. TypeConstraints override this method to write
 ///     the name of the type.
 /// </summary>
 /// <param name="writer">The writer on which the internalActual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(internalActual == null ? null : internalActual.GetType());
 }
Esempio n. 4
0
 /// <summary>
 ///     Writes the internalActual value supplied to the specified writer.
 /// </summary>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(attrFound);
 }
 /// <summary>
 ///     Write the internalActual value for a failing constraint test to a
 ///     MessageWriter. The default implementation simply writes
 ///     the raw value of internalActual, leaving it to the writer to
 ///     perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the internalActual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(propValue);
 }
Esempio n. 6
0
 /// <summary>
 ///     Write the internalActual value for a failing constraint test to a
 ///     MessageWriter. The default implementation simply writes
 ///     the raw value of internalActual, leaving it to the writer to
 ///     perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the internalActual value is displayed</param>
 public virtual void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(internalActual);
 }
Esempio n. 7
0
 /// <summary>
 ///     Write the internalActual value for a failing constraint test to a
 ///     MessageWriter.
 /// </summary>
 /// <param name="writer">The writer on which the internalActual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(actualType);
 }