Ejemplo n.º 1
0
 private static SlashdocDictionary ReadSampleAssemblySlashdoc()
 {
     using (var stream = new FileStream(@"NuDocTests.xml", FileMode.Open, FileAccess.Read))
     {
         return(SlashdocReader.Parse(stream));
     }
 }
Ejemplo n.º 2
0
        private static void DiffSlashdocFiles(string left, string right)
        {
            Console.WriteLine("---diff---");
            var nudoc = SlashdocReader.Parse(new FileStream(left, FileMode.Open, FileAccess.Read));
            var other = SlashdocReader.Parse(new FileStream(right, FileMode.Open, FileAccess.Read));

            Diff("NuDoc but not other: ", nudoc, other);
            Diff("Other but not NuDoc: ", other, nudoc);
        }
Ejemplo n.º 3
0
        public void ShouldFailWhenReadingAnInvalidSlashdocFile()
        {
            var stream = new MemoryStream(Encoding.UTF8.GetBytes("<doc>no closing tag"));

            Assert.That(() => SlashdocReader.Parse(stream), Throws.InstanceOf <XmlException>());
        }