public void simpleTest()
        {
            Report.DATABASE.reset();
            SOMReportFile file = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));

            file.parseLeagueFile();
            RecordBookReport recordBookReport = (RecordBookReport)file.FindReport("RECORD BOOK FOR FOR");

            recordBookReport.processReport(Program.LEAGUES[0].Length);
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            Report.DATABASE.reset();
            SOMReportFile file = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));
            file.parseLeagueFile();
            leagueStandingsReport = (LeagueStandingsReport)file.FindReport("LEAGUE STANDINGS FOR");
            leagueStandingsReport.processReport(Program.LEAGUES[0].Length);

            lineScoreReport = (LineScoreAndMinorsReport)file.FindReport("INJURY/MINOR LEAGUE REPORT FOR");
            lineScoreReport.processReport(Program.LEAGUES[0].Length);
        }
Ejemplo n.º 3
0
 public void Initialize()
 {
     Config.PRT_FILE_LOCATION = "testData";
     Config.LEAGUE_NAME       = "";
     Report.DATABASE.reset();
     string [] leagues = { "" };
     Program.LEAGUES = leagues;
     file            = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));
     file.parseLeagueFile();
     leagueStandingsReport = (LeagueStandingsReport)file.FindReport("LEAGUE STANDINGS FOR");
     leagueStandingsReport.processReport(Program.LEAGUES[0].Length);
 }
Ejemplo n.º 4
0
 private void internal_cleanUpLineTestCleanupLine(SOMReportFile file)
 {
     Assert.AreEqual(file.cleanUpLine("AA AAA"), "AA AAA");
     Assert.AreEqual(file.cleanUpLine("AA [A]AA"), "AA [A]AA");
     Assert.AreEqual(file.cleanUpLine("AA [0]AA"), "AA [0]AA");
     Assert.AreEqual(file.cleanUpLine("AA [1]AA"), "AA AA");
     Assert.AreEqual(file.cleanUpLine("AA [2]AA"), "AA AA");
     Assert.AreEqual(file.cleanUpLine("AA [3]AA"), "AA AA");
     Assert.AreEqual(file.cleanUpLine("AA [4]AA"), "AA [4]AA");
     Assert.AreEqual(file.cleanUpLine("AA [5]AA"), "AA [5]AA");
     Assert.AreEqual(file.cleanUpLine("[0]AA AA"), "[0]AA AA");
     //Assert.AreEqual(file.cleanUpLine("AA AA[0]"), "AA AA");
 }
        public void Initialize()
        {
            Config.PRT_FILE_LOCATION = "testData";
            Config.LEAGUE_NAME       = "";
            Report.DATABASE.reset();
            RecordIndex.resetIndex(RecordIndex.INDEX.TestTeamId);

            SOMReportFile file = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));

            file.parseLeagueFile();
            leagueStandingsReport = (LeagueStandingsReport)file.FindReport("LEAGUE STANDINGS FOR");
            leagueStandingsReport.processReport(Program.LEAGUES[0].Length);

            leaguePrimaryStatReport = (LeagueGrandTotalsReport)file.FindReport("LEAGUE GRAND TOTALS (primary report) FOR");
            leaguePrimaryStatReport.processReport(Program.LEAGUES[0].Length);
        }
Ejemplo n.º 6
0
        public void initialize(int daysPlayed)
        {
            Program.daysPlayed = daysPlayed;
            Report.DATABASE.reset();

            Console.WriteLine("  Loading League Report File ...");
            leagueReportFile = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));
            leagueReportFile.parseLeagueFile();


            IFeature feature = FeatureFactory.loadFeature(FeatureFactory.FEATURE.STANDINGS);

            feature.initialize(leagueReportFile);

            Console.WriteLine("    Building Grand Totals...");
            leaguePrimaryStatReport = (LeagueGrandTotalsReport)leagueReportFile.FindReport("LEAGUE GRAND TOTALS (primary report) FOR");
            leaguePrimaryStatReport.processReport(Program.LEAGUES[0].Length);

            Console.WriteLine("    Building League Report ...");
            lineScoreReport = (LineScoreAndMinorsReport)leagueReportFile.FindReport("INJURY/MINOR LEAGUE REPORT FOR");
            lineScoreReport.processReport(Program.LEAGUES[0].Length);

            Console.WriteLine("    Building Awards...");
            newspaperStyleReport = (NewspaperStyleReport)leagueReportFile.FindReport("AWARDS VOTING FOR");
            newspaperStyleReport.processReport(Program.LEAGUES[0].Length);

            Console.WriteLine("    Building Record Book...");
            feature = FeatureFactory.loadFeature(FeatureFactory.FEATURE.RECORD_BOOK);
            feature.initialize(leagueReportFile);

            output.setOutputHeader(leagueReportFile.SeasonTitle, daysPlayed);

            Console.WriteLine("  Loading Team Report File...");
            teamReportFile = new SOMReportFile(Config.getConfigurationFile("TEAM_ALL_REPORTS.PRT"));
            teamReportFile.parseTeamFile();

            featureUsage = FeatureFactory.loadFeature(FeatureFactory.FEATURE.USAGE);
            featureUsage.initialize(teamReportFile);

            featureUnderUsage = FeatureFactory.loadFeature(FeatureFactory.FEATURE.UNDERUSAGE);
            ((FeatureUnderUsage)featureUnderUsage).setReportData(((FeatureUsage)featureUsage).teamComparisonReport);
            featureUnderUsage.initialize(teamReportFile);
        }
Ejemplo n.º 7
0
 public void cleanUpLineTestCleanupLine(SOMReportFile file)
 {
     internal_cleanUpLineTestCleanupLine(leagueReportFile);
     internal_cleanUpLineTestCleanupLine(teamReportFile);
 }
Ejemplo n.º 8
0
 public void Initialize()
 {
     leagueReportFile = new SOMReportFile(Config.getConfigurationFile("ALL_REPORTS.PRT"));
     teamReportFile   = new SOMReportFile(Config.getConfigurationFile("TEAM_ALL_REPORTS.PRT"));
 }