public static void Main()
        {
            Tester tester = new Tester();
            const string baseDir = @"C:\TestFiles\";
            tester.RunTest("Took {0} ms to serialise small database", RunSmallSerialisationTest, baseDir + "smallDatabaseSer.csv");
            tester.RunTest("Took {0} ms to serialise medium database", RunMediumSerialisationTest, baseDir + "mediumDatabaseSer.csv");
            tester.RunTest("Took {0} ms to serialise large database", RunLargeSerialisationTest, baseDir + "largeDatabaseSer.csv");
            tester.RunTest("Took {0} ms to deserialise small database", RunSmallDeserialisationTest, baseDir + "smallDatabaseDes.csv");
            tester.RunTest("Took {0} ms to deserialise medium database", RunMediumDeserialisationTest, baseDir + "mediumDatabaseDes.csv");
            tester.RunTest("Took {0} ms to deserialise large database", RunLargeDeserialisationTest, baseDir + "largeDatabaseDes.csv");

            tester.RunTest("Took {0} ms to serialise a database with {1} tables", RunSerialisationTest, baseDir +"databaseSerialisation.csv", 50, 20);
            tester.RunTest("Took {0} ms to deserialise a database with {1} tables", RunDeserialisationTest, baseDir + "databaseDeserialisation.csv", 50, 20);
        }
Example #2
0
        public static void Main()
        {
            var schemaReader = XmlReader.Create("database.xsd");
            var schema = XmlSchema.Read(schemaReader, ValidationEvent);

            Tester tester = new Tester();

            tester.RunTest("Took {0} ms to validate an XmlDocument file with {1} Entities", numEntities => DoXmlSizeTestXmlDoc(numEntities, schema), "xmlDocSize.csv", 20, 10);
            tester.RunTest("Took {0} ms to validate an XPathNavigator file with {1} Entities", numEntities => DoXmlSizeTestXPathNavigator(numEntities, schema), "XPathSize.csv", 20, 10);
            tester.RunTest("Took {0} ms to search an XmlDocument with {1} Entities", DoXmlSearchTestXmlDoc, "xmlDocSearch.csv", 20, 10);
            tester.RunTest("Took {0} ms to search an XmlDocument with {1} Entities", DoXmlSearchTestXPathNavigator, "XPathSearch.csv", 20, 10);
        }