public void RunTest() { SimulationEngineTestPreparer se = new SimulationEngineTestPreparer("MasterBatch"); List <string> arguments = new List <string> { "--MakeMasterBatch" }; MainSimEngine.Run(arguments.ToArray(), "simulationengine.exe"); DateTime d = DateTime.Now; string dstDir = @"x:\Calc\" + d.Year + "." + d.Month + "." + d.Day + ".." + d.Hour + "." + d.Minute; Process p = new Process { StartInfo = { FileName = "robocopy.exe", Arguments = se.WorkingDirectory + " " + dstDir + " /E /MIR", UseShellExecute = true } }; p.Start(); p.WaitForExit(); p.Dispose(); p = new Process { StartInfo = { FileName = "robocopy.exe" } }; dstDir = @"e:\masterbatchForImport"; p.StartInfo.Arguments = se.WorkingDirectory + " " + dstDir + " /E /MIR"; p.StartInfo.UseShellExecute = true; p.Start(); p.WaitForExit(); p.Dispose(); se.Clean(); }
public void PdfReplacerTest() { SimulationEngineTestPreparer se = new SimulationEngineTestPreparer("MasterBatch"); List <string> arguments = new List <string> { "--Batch-ModularHouseholds" }; Config.IsInUnitTesting = true; MainSimEngine.Run(arguments.ToArray(), "simulationengine.exe"); DateTime d = DateTime.Now; string dstDir = @"x:\Calc\" + d.Year + "." + d.Month + "." + d.Day + ".." + d.Hour + "." + d.Minute; using (Process p = new Process { StartInfo = { FileName = "robocopy.exe", Arguments = se.WorkingDirectory + " " + dstDir + " /E /MIR", UseShellExecute = true } }) { p.Start(); } using (var p = new Process { StartInfo = { FileName = "robocopy.exe" } }) { dstDir = @"e:\masterbatchForImport"; p.StartInfo.Arguments = se.WorkingDirectory + " " + dstDir + " /E /MIR"; p.StartInfo.UseShellExecute = true; p.Start(); p.WaitForExit(); p.Dispose(); } se.Clean(); }
public void RunTest() { using SimulationEngineTestPreparer se = new SimulationEngineTestPreparer("MakeResults1PV"); List <string> arguments = new List <string> { "--MakeResults1PV", @"X:\R1_PV_2kw", @"F:\DissCalcsResults\PVResults_2kw" }; MainSimEngine.Run(arguments.ToArray(), "simulationengine.exe"); se.Clean(); }
public void RunNaturalLightBatch() { Config.IsInUnitTesting = true; Config.CatchErrors = false; SimulationEngineTestPreparer se = new SimulationEngineTestPreparer("RunNaturalLight"); List <string> arguments = new List <string> { "--MakeLightBatch" }; MainSimEngine.Run(arguments.ToArray(), "simulationengine.exe"); se.Clean(); }