/// <summary>
        /// Writes the value of the expected object.
        /// </summary>
        public string WriteExpected()
        {
            MessageWriter writer = new TextMessageWriter();

            if (Actual is IUnexpectedElement)
            {
                writer.Write("nothing");
            }
            else
            {
                writer.WriteValue(Expected);
            }
            return(writer.ToString());
        }
 public void IntegerIsWrittenAsIs()
 {
     writer.WriteValue(42);
     Expect(writer.ToString(), EqualTo("42"));
 }