示例#1
0
        public void SutCanRoundTripToString(
            XmlContentSerializer serializer,
            AtomFeedBuilder <XmlAttributedTestEventY> builder)
        {
            var expected = builder.Build();
            var xml      = expected.ToXmlString(serializer);

            AtomFeed actual = AtomFeed.Parse(xml, serializer);

            Assert.Equal(expected, actual, new AtomFeedComparer());
        }
        public void ClientCanReadWrittenFeed(
            AtomEventsInMemory sut,
            AtomFeedBuilder <XmlAttributedTestEventY> feedBuilder,
            XmlContentSerializer serializer)
        {
            var expected = feedBuilder.Build();

            using (var w = sut.CreateFeedWriterFor(expected))
                expected.WriteTo(w, serializer);
            using (var r = sut.CreateFeedReaderFor(expected.Locate()))
            {
                var actual = AtomFeed.ReadFrom(r, serializer);

                Assert.Equal(expected, actual, new AtomFeedComparer());
            }
        }