Exemple #1
0
        protected FilingSummary BuildAndVerifyRecursive(string folder, string instanceName, string taxonomyName)
        {
            Console.WriteLine("=================================================");
            Console.WriteLine("  BUILD AND VERIFY " + folder + "...");
            Console.WriteLine("=================================================");

            string baselineResultFolder = PathCombine(this.baseDir, folder, "Results");

            this.resultsPath = baselineResultFolder;

            if (!RB_Tests.BuildAndVerifyWithoutResults && !Directory.Exists(this.resultsPath))
            {
                Assert.Fail("There are no results to verify againsts.");
            }

            string generatedResultFolder = PathCombine(this.baseDir, folder, "Reports");

            this.reportsPath = generatedResultFolder;

            string failedResultsFolder = Path.GetDirectoryName(generatedResultFolder);

            failedResultsFolder = Path.Combine(failedResultsFolder, "Failures");
            CleanFolder(failedResultsFolder);

            FilingSummary fs = BuildFiling(folder, instanceName, taxonomyName);

            using (ErrorWriter writer = new ErrorWriter())
            {
                VerifyIndividualReports(writer, baselineResultFolder, generatedResultFolder, failedResultsFolder);
                VerifyCharts(writer, baselineResultFolder, generatedResultFolder);

                if (writer.HasErrors)
                {
                    writer.Flush();
                    writer.SaveResults(failedResultsFolder);

                    Console.Write(writer.GetStringBuilder().ToString().Trim());
                    Assert.Fail(writer.GetStringBuilder().ToString().Trim());
                }
            }

            return(fs);
        }
Exemple #2
0
        public void EndReport(string file)
        {
            this.WriteLine("*************************Comparison ENDED " + file + "*************************");
            this.WriteLine();

            ErrorWriter report = this._reports.Pop();

            if (report.HasErrors)
            {
                report.Flush();

                if (this.currentReport == null)
                {
                    this.Errors += report.Errors;
                    report.SaveFailedFiles();
                }
                else
                {
                    this.currentReport.Errors += report.Errors;
                }

                this.Write(report.GetStringBuilder().ToString().Trim());
            }
        }
Exemple #3
0
        protected FilingSummary BuildAndVerifyRecursive( string folder, string instanceName, string taxonomyName )
        {
            Console.WriteLine( "=================================================" );
            Console.WriteLine( "  BUILD AND VERIFY " + folder + "..." );
            Console.WriteLine( "=================================================" );

            string baselineResultFolder = PathCombine( this.baseDir, folder, "Results" );
            this.resultsPath = baselineResultFolder;

            if( !RB_Tests.BuildAndVerifyWithoutResults && !Directory.Exists( this.resultsPath ) )
                Assert.Fail( "There are no results to verify againsts." );

            string generatedResultFolder = PathCombine( this.baseDir, folder, "Reports" );
            this.reportsPath = generatedResultFolder;

            string failedResultsFolder = Path.GetDirectoryName( generatedResultFolder );
            failedResultsFolder = Path.Combine( failedResultsFolder, "Failures" );
            CleanFolder( failedResultsFolder );

            FilingSummary fs = BuildFiling( folder, instanceName, taxonomyName );
            using( ErrorWriter writer = new ErrorWriter() )
            {
                VerifyIndividualReports( writer, baselineResultFolder, generatedResultFolder, failedResultsFolder );
                VerifyCharts( writer, baselineResultFolder, generatedResultFolder );

                if( writer.HasErrors )
                {
                    writer.Flush();
                    writer.SaveResults( failedResultsFolder );

                    Console.Write( writer.GetStringBuilder().ToString().Trim() );
                    Assert.Fail( writer.GetStringBuilder().ToString().Trim() );
                }
            }

            return fs;
        }