/// <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); } }
/// <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); } }
/// <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()); }
/// <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); }
/// <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); }
/// <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); }