public void RunChartGeneratorTests() { Config.ReallyMakeAllFilesIncludingBothSums = true; CleanTestBase.RunAutomatically(false); var cs = new OxyCalculationSetup(Utili.GetCurrentMethodAndClass()); cs.StartHousehold(1, GlobalConsts.CSVCharacter, configSetter: x => { x.ApplyOptionDefault(OutputFileDefault.All); x.Disable(CalcOption.MakeGraphics); x.Disable(CalcOption.MakePDF); }); CalculationProfiler cp = new CalculationProfiler(); ChartCreationParameters ccp = new ChartCreationParameters(144, 2000, 1000, false, GlobalConsts.CSVCharacter, new DirectoryInfo(cs.DstDir)); using (var fft = cs.GetFileTracker()) { ChartGeneratorManager cgm = new ChartGeneratorManager(cp, fft, ccp); Logger.Info("Making picture"); cgm.Run(cs.DstDir); } Logger.Info("finished picture"); cs.CleanUp(); CleanTestBase.RunAutomatically(true); }
public void MakeDocumentTestFull() { var cs = new OxyCalculationSetup(Utili.GetCurrentMethodAndClass()); var name = cs.StartHousehold(1, GlobalConsts.CSVCharacter, LoadTypePriority.All, null, x => x.ApplyOptionDefault(OutputFileDefault.All)); CalculationProfiler cp = new CalculationProfiler(); ChartCreationParameters ccp = new ChartCreationParameters(144, 1600, 1000, false, GlobalConsts.CSVCharacter, new DirectoryInfo(cs.DstDir)); using (FileFactoryAndTracker fft = cs.GetFileTracker()) { var cg = new ChartGeneratorManager(cp, fft, ccp); Logger.Info("Making picture"); cg.Run(cs.DstDir); Logger.Info("finished picture"); MigraPDFCreator mpc = new MigraPDFCreator(cp); mpc.MakeDocument(cs.DstDir, name + ".test", false, false, GlobalConsts.CSVCharacter, fft); } //cs.CleanUp(1); }
public void MakeFullPDFDocumentTest() { //const bool blub = true; //// doesn't work on the testing server somehow //if (blub) // return; Config.ReallyMakeAllFilesIncludingBothSums = true; var cs = new OxyCalculationSetup(Utili.GetCurrentMethodAndClass()); var name = cs.StartHousehold(1, GlobalConsts.CSVCharacter, LoadTypePriority.Mandatory, null, x => { x.ApplyOptionDefault(OutputFileDefault.All); x.CarpetPlotWidth = 7; x.Disable(CalcOption.MakeGraphics); x.Disable(CalcOption.MakePDF); }); CalculationProfiler cp = new CalculationProfiler(); ChartCreationParameters ccp = new ChartCreationParameters(144, 1600, 1000, false, GlobalConsts.CSVCharacter, new DirectoryInfo(cs.DstDir)); using (var fft = cs.GetFileTracker()) { var cg = new ChartGeneratorManager(cp, fft, ccp); Logger.Info("Making picture"); cg.Run(cs.DstDir); Logger.Info("finished picture"); MigraPDFCreator mpc = new MigraPDFCreator(cp); mpc.MakeDocument(cs.DstDir, name + ".test", false, true, GlobalConsts.CSVCharacter, fft); } Thread.Sleep(5000); cs.CleanUp(); #pragma warning restore CS0162 // Unreachable code detected #pragma warning restore VSD0020 // The condition is a constant and thus unnecessary. #pragma warning restore S2583 // Conditions should not unconditionally evaluate to "true" or to "false" #pragma warning restore RECS0110 // Condition is always 'true' or always 'false' }
public void MakeDocumentTest() { var cs = new OxyCalculationSetup(Utili.GetCurrentMethodAndClass()); var name = cs.StartHousehold(1, GlobalConsts.CSVCharacter, LoadTypePriority.Mandatory, null, x => { x.Enable(CalcOption.TotalsPerLoadtype); x.Enable(CalcOption.HouseholdContents); }); CalculationProfiler cp = new CalculationProfiler(); ChartCreationParameters ccp = new ChartCreationParameters(144, 1600, 1000, false, GlobalConsts.CSVCharacter, new DirectoryInfo(cs.DstDir)); using (var fft = cs.GetFileTracker()) { var cg = new ChartGeneratorManager(cp, fft, ccp); Logger.Info("Making picture"); cg.Run(cs.DstDir); Logger.Info("finished picture"); MigraPDFCreator mpc = new MigraPDFCreator(cp); mpc.MakeDocument(cs.DstDir, name + ".test", false, false, GlobalConsts.CSVCharacter, fft); } cs.CleanUp(1); }