示例#1
0
        public void write_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName  = "Miller"
            };

            theFormatter.Write(xmlInput, new CurrentRequest());

            streamingData.RewindOutput();
            streamingData.CopyOutputToInputForTesting();

            var xmlOutput = theFormatter.Read <XmlFormatterModel>(new CurrentRequest());

            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldEqual(xmlInput.FirstName);
            xmlOutput.LastName.ShouldEqual(xmlInput.LastName);
        }