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); }
public void readReportLinesTestLineReader() { List <Report> reports = file.Reports; Assert.AreEqual(reports.Count, 12); foreach (Report report in reports) { Debug.WriteLine(report.Name); } Assert.IsNotNull(file.FindReport("LEAGUE STANDINGS FOR")); Assert.IsNull(file.FindReport("XXX")); }
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); }
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); }
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); }
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); }