private static int Main(string[] args) { string suiteFile = args[0]; FileInfo suiteFileInfo = new FileInfo(suiteFile); string fullName = suiteFileInfo.FullName; string extension = suiteFileInfo.Extension; XmlReaderSettings readerSettings = new XmlReaderSettings(); readerSettings.CloseInput = false; using (FileStream fileStream = suiteFileInfo.OpenRead()) { XmlTextReader suitesReader = new XmlTextReader(new StreamReader(fileStream)); using (XmlReader reader = XmlReader.Create(suitesReader, readerSettings)) { reader.MoveToContent(); string LoadingSchemaNamespace = reader.NamespaceURI; ORMSuiteReportResult result = ORMSuiteReportResult.NoFailure; if (LoadingSchemaNamespace == SchemaNamespace) { //If the suite is not a report then we need to generate a report. IList <Suite> suites = Suite.LoadSuiteFile(suiteFile); if (suites != null) { int suiteCount = suites.Count; IORMToolServices services = Suite.CreateServices(); XmlWriterSettings reportSettings = new XmlWriterSettings(); reportSettings.Indent = true; reportSettings.IndentChars = "\t"; using (XmlWriter reportWriter = XmlTextWriter.Create(string.Concat(fullName.Substring(0, fullName.Length - extension.Length), ".Report", extension), reportSettings)) { IORMToolTestSuiteReport report = ((IORMToolTestSuiteReportFactory)services.ServiceProvider.GetService(typeof(IORMToolTestSuiteReportFactory))).Create(reportWriter); try { for (int i = 0; i < suiteCount; ++i) { suites[i].Run(services, report); } } finally { result = report.CloseSuiteReport(); } } } } else if (LoadingSchemaNamespace == ReportSchemaNamespace) { //TODO: where to go with a report } return((int)result); } } }
public FCExactlyOneTests() : this(Suite.CreateServices()) { }
public DTBlankTests() : this(Suite.CreateServices()) { }
public ConstraintContradictionTests() : this(Suite.CreateServices()) { }
public Tests() : this(Suite.CreateServices()) { }
public FCMinMaxTests() : this(Suite.CreateServices()) { }
public PopulationTests() : this(Suite.CreateServices()) { }
public PreferredPathTests() : this(Suite.CreateServices()) { }
public ImplicationErrorTests() : this(Suite.CreateServices()) { }
public NMinus1Tests() : this(Suite.CreateServices()) { }
public NotWellModeledTests() : this(Suite.CreateServices()) { }