/// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     DirectoryInfo dir = actual as DirectoryInfo;
     if (dir == null)
         base.WriteActualValueTo(writer);
     else
     {
         writer.WriteActualValue(dir);
         writer.Write(" with {0} files and {1} directories", files, subdirs);
     }
 }
        /// <summary>
        /// Write the actual value for a failing constraint test to a
        /// MessageWriter. The default implementation simply writes
        /// the raw value of actual, leaving it to the writer to
        /// perform any formatting.
        /// </summary>
        /// <param name="writer">The writer on which the actual value is displayed</param>
        public override void WriteActualValueTo(MessageWriter writer)
        {
            DirectoryInfo dir = actual as DirectoryInfo;

            if (dir == null)
            {
                base.WriteActualValueTo(writer);
            }
            else
            {
                writer.WriteActualValue(dir);
                writer.Write(" with {0} files and {1} directories", files, subdirs);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual 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);
     }
 }
        /// <summary>
        /// Write the actual value for a failing constraint test to a
        /// MessageWriter. The default implementation simply writes
        /// the raw value of actual, leaving it to the writer to
        /// perform any formatting.
        /// </summary>
        /// <param name="writer">The writer on which the actual value is displayed</param>
		public override void WriteActualValueTo(MessageWriter writer)
		{
			writer.WriteActualValue( this.caughtException.GetType() );
		}
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual 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);
 }
 /// <summary>
 /// Writes the actual value supplied to the specified writer.
 /// </summary>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(attrFound);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Write the actual 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 actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(actual == null ? null : actual.GetType());
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(actualType);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(propValue);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(this.caughtException.GetType());
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter. The default implementation simply writes
 /// the raw value of actual, leaving it to the writer to
 /// perform any formatting.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public virtual void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(actual);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Writes the actual value supplied to the specified writer.
 /// </summary>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(attrFound);
 }
 /// <summary>
 /// Write the actual value for a failing constraint test to a
 /// MessageWriter.
 /// </summary>
 /// <param name="writer">The writer on which the actual value is displayed</param>
 public override void WriteActualValueTo(MessageWriter writer)
 {
     writer.WriteActualValue(actualType);
 }
		/// <summary>
		/// Write the actual value for a failing constraint test to a
		/// MessageWriter. The default implementation simply writes
		/// the raw value of actual, leaving it to the writer to
		/// perform any formatting.
		/// </summary>
		/// <param name="writer">The writer on which the actual value is displayed</param>
		public override void WriteActualValueTo(MessageWriter writer)
		{
            writer.WriteActualValue(propValue);
		}
        /// <summary>
        /// Write the actual 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 actual value is displayed</param>
		public override void WriteActualValueTo(MessageWriter writer)
		{
			writer.WriteActualValue( actual == null ? null : actual.GetType() ); 
		}