Exemplo n.º 1
0
        public static void ParseCyphersToXML()
        {
            var directory    = @"E:\Documents\Tabletop RPGs\Numenera\APPs\Cyphers\";
            var name         = "RAW_Cyphers_Discovery.txt";
            var fileName     = Path.Combine(directory, name);
            var fileNameXml  = fileName + "_xml.xml";
            var deviceParser = new DevicesParser("Discovery", DeviceType.Cypher);

            deviceParser.CreateXMLFromRawCyphersText(fileName, fileNameXml);
            var cyphers = NumeneraXML.DeserializeCyphersListFromXML(fileNameXml);

            cyphers.ForEach(x => Console.WriteLine(x));
        }
Exemplo n.º 2
0
        public void TestPDFParsing_Cyphers()
        {
            var directory    = @"..\..\..\ExampleFiles";
            var name         = "Test_Cyphers.txt";
            var fileName     = Path.Combine(directory, name);
            var fileNameXml  = Path.Combine(directory, Path.GetFileNameWithoutExtension(fileName) + ".xml");
            var deviceParser = new DevicesParser("Discovery", DeviceType.Cypher);

            deviceParser.CreateXMLFromRawCyphersText(fileName, fileNameXml);
            var cyphers = NumeneraXML.DeserializeCyphersListFromXML(fileNameXml);

            cyphers.Should().BeEquivalentTo(CyphersExample.List);
        }