예제 #1
0
 private static SlashdocDictionary ReadSampleAssemblySlashdoc()
 {
     using (var stream = new FileStream(@"NuDocTests.xml", FileMode.Open, FileAccess.Read))
     {
         return(SlashdocReader.Parse(stream));
     }
 }
예제 #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);
        }
예제 #3
0
        public void ShouldFailWhenReadingAnInvalidSlashdocFile()
        {
            var stream = new MemoryStream(Encoding.UTF8.GetBytes("<doc>no closing tag"));

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