public void read_value()
        {
            var xmlInput = new XmlFormatterModel(){
                FirstName = "Jeremy",
                LastName = "Miller"
            };

            streamingData.XmlInputIs(xmlInput);

            var xmlOutput = theFormatter.Read<XmlFormatterModel>();
            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldEqual(xmlInput.FirstName);
            xmlOutput.LastName.ShouldEqual(xmlInput.LastName);
        }
        public void read_value()
        {
            var xmlInput = new XmlFormatterModel(){
                FirstName = "Jeremy",
                LastName = "Miller"
            };

            theRequest.Body.XmlInputIs(xmlInput);

            var xmlOutput = theFormatter.Read<XmlFormatterModel>(context);
            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldBe(xmlInput.FirstName);
            xmlOutput.LastName.ShouldBe(xmlInput.LastName);
        }
Exemple #3
0
        public void read_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName  = "Miller"
            };

            theRequest.Body.XmlInputIs(xmlInput);

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

            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldBe(xmlInput.FirstName);
            xmlOutput.LastName.ShouldBe(xmlInput.LastName);
        }
        public void read_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName  = "Miller"
            };

            streamingData.XmlInputIs(xmlInput);

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

            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldEqual(xmlInput.FirstName);
            xmlOutput.LastName.ShouldEqual(xmlInput.LastName);
        }
        public void write_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName = "Miller"
            };

            theFormatter.Write(xmlInput, "text/xml");

            streamingData.CopyOutputToInputForTesting(writer.OutputStream());

            var xmlOutput = theFormatter.Read<XmlFormatterModel>();
            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldEqual(xmlInput.FirstName);
            xmlOutput.LastName.ShouldEqual(xmlInput.LastName);
        }
Exemple #6
0
        public void write_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName  = "Miller"
            };

            theFormatter.Write(context, xmlInput, "text/xml");

            theRequest.Body.ReplaceBody(writer.OutputStream());

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

            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldBe(xmlInput.FirstName);
            xmlOutput.LastName.ShouldBe(xmlInput.LastName);
        }
        public void write_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName  = "Miller"
            };

            theFormatter.Write(xmlInput, "text/xml");

            streamingData.CopyOutputToInputForTesting(writer.OutputStream());

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

            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

            xmlOutput.FirstName.ShouldEqual(xmlInput.FirstName);
            xmlOutput.LastName.ShouldEqual(xmlInput.LastName);
        }
        public void write_value()
        {
            var xmlInput = new XmlFormatterModel()
            {
                FirstName = "Jeremy",
                LastName = "Miller"
            };

            theFormatter.Write(context, xmlInput, "text/xml");

            theRequest.Body.ReplaceBody(writer.OutputStream());

            var xmlOutput = theFormatter.Read<XmlFormatterModel>(context);
            xmlOutput.ShouldNotBeTheSameAs(xmlInput);

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