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