public void TestMethod2() { List <Person> CommaList = RunProgram.Run("CommaDelimited", "birth", "asc", ','); List <Person> CommaList2 = RunProgram.Run("CommaDelimited", "birth", "asc", ','); Assert.AreEqual(CommaList, CommaList2); }
static void Main(string[] args) { var primeGenerator = new PrimesGenerator(); primeGenerator.FillList(); Console.WriteLine("Let's locate some prime numbers!"); Console.WriteLine(); Console.WriteLine("This application will find you any prime, in order, from first prime number on."); do { Console.Write("Which prime number are you looking for? \n"); int index = int.Parse(Console.ReadLine()); for (int i = 1; i < primeGenerator.Count; i++) { if (index == i - 1) { Console.WriteLine($"The number {index} prime is {primeGenerator[index - 1]}\n"); } } Console.WriteLine("Would you like to lookup another prime number?"); } while (RunProgram.PlayAgain(Console.ReadLine())); Console.ReadKey(); }
public void TestMethod1() { List <Person> PipeList = RunProgram.Run("PipeDelimited", "gender", "asc", '|'); List <Person> PipeList2 = RunProgram.Run("PipeDelimited", "gender", "asc", '|'); Assert.AreEqual(PipeList, PipeList2); }
void TaskOnClick() { string path = EditorUtility.OpenFilePanel( "Открыть новый проект", "", "ev3"); if (path.Length != 0) { RunProgram run = new RunProgram(path); GlobalVariables.CurrentProgram = run; int i = 0; foreach (Transform child in Parent) { Destroy(child.gameObject); } Parent.DetachChildren(); foreach (var prog in run.RunningProgram) { Instantiate(Prefab, Parent); Parent.GetChild(i).GetChild(0).GetComponent <Text>().text = prog.Key; i++; } } }
public void SetUp() { _runServiceMock = new Mock <IRunService>(); _enrollmentSerivceMock = new Mock <IEnrollmentObjectService>(); _sut = new RunProgram(_runServiceMock.Object, _enrollmentSerivceMock.Object); fixture = new Fixture(); }
public void TestMethod3() { List <Person> SpaceList = RunProgram.Run("SpaceDelimited", "lastname", "desc", ' '); List <Person> SpaceList2 = RunProgram.Run("SpaceDelimited", "lastname", "desc", ' '); Assert.AreEqual(SpaceList, SpaceList2); }
public void FindSDKTool() { string result = RunProgram.FindSDKTool("foo.exe"); Assert.IsNull(result); result = RunProgram.FindSDKTool("winres.exe"); Assert.AreEqual(@"c:\program files\microsoft sdks\windows\v6.1\bin\winres.exe", result, true); }
public void If_User_Wants_To_Run_Again_Should_Be_False(string x) { //assemble var ans = RunProgram.PlayAgain(x); //Act //Assert Assert.IsFalse(ans); }
public void RunTool() { string exeName = RunProgram.FindSDKTool("winres.exe"); RunProgram runner = new RunProgram(); int exitCode = runner.Run(exeName, "", @"C:\"); Console.WriteLine("Exit code: {0}", exitCode); Console.WriteLine("Output: "); Console.WriteLine(runner.Output); }
private static void Main(string[] args) { #pragma warning disable 162 if (false) // ReSharper disable once HeuristicUnreachableCode { string parameterString = @"<Parameters> </Parameters>"; XElement parameters = XElement.Load(new StringReader(parameterString)); RunProgram <DiseaseNode> .Run(args, Integrator.Euler, parameters); } else { List <SimCountryData> records; using (var reader = new StreamReader("../../../Data/MyData.csv")) using (var csv = new CsvReader(reader)) { csv.Configuration.HasHeaderRecord = true; csv.Configuration.HeaderValidated = null; records = new List <SimCountryData>(csv.GetRecords <SimCountryData>()); } Policy p = new Policy(Policy.DEFAULT); Locale l = new Locale(Locale.DEFAULT); Disease d = new Disease(Disease.DEFAULT); foreach (SimCountryData country in records) { l.Population = country.Population; l.HealthCareEffectiveness = country.HealthCareEffectiveness * country.HealthCareEffectiveness; l.Area = ((double)country.Population) / country.PopDensity; l.DoctorsPerCapita = country.PhysiciansPerCap; l.MortalityRate = country.DeathRate; l.BirthRate = country.BirthRate; l.Sanitation = country.Sanitation * country.Sanitation; l.SocialStability = country.SocialStability; RunProgram <DiseaseNode> .Run(args, Integrator.Euler, null, $"D:/Desktop/DiseaseModelJunque/ComparativeCharts/{country.CountryCode}.csv", null, null, new DiseaseNode(p, l, d) { ContagiousAsymptomatic = 1 }); //foreach (EpidemicNode s in Behavior<EpidemicNode>.Run(new EpidemicNode(p, l, d), Integrator.Euler)) //{ // Console.Write("{0:0.000},", s.TimeSliceNdx*s.TimeStep); // foreach (var getter in s.StockGetters) // { // Console.Write("{0:0.000},", getter(s)); // } // Console.WriteLine(); //} //break; } } #pragma warning restore 162 }
public Editor(Theme theme) { InitializeComponent(); this.Theme = theme; autoCompleter = new AutoCompleter(); runProgram = new RunProgram(); suggestionsBox.Font = EditorFont; textBox.Font = EditorFont; textBox.BackColor = Theme.BackColor; textBox.ForeColor = Theme.ForeColor; _supresstab = false; }
private void FinishSingle(object sender,EventArgs e) { RunProgram _action = new RunProgram(ImageItemList[NowNumberOfImage].Complete); Dispatcher.BeginInvoke(_action); //ImageItemList[NowNumberOfImage].Complete(); NowNumberOfImage++; if (NowNumberOfImage<ImageItemList.Count) { string inputFileFullName = ImageItemList[NowNumberOfImage].FullName; string inputFileName = ImageItemList[NowNumberOfImage].Name; ProcessAction("-i " + inputFileFullName + " -o " + OutputDirectory + inputFileName + ProcessArgumentBehindPart); } }
private void FinishSingle(object sender, EventArgs e) { RunProgram _action = new RunProgram(ImageItemList[NowNumberOfImage].Complete); Dispatcher.BeginInvoke(_action); //ImageItemList[NowNumberOfImage].Complete(); NowNumberOfImage++; if (NowNumberOfImage < ImageItemList.Count) { string inputFileFullName = ImageItemList[NowNumberOfImage].FullName; string inputFileName = ImageItemList[NowNumberOfImage].Name; ProcessAction("-i " + inputFileFullName + " -o " + OutputDirectory + inputFileName + ProcessArgumentBehindPart); } }
public void TestLynxHare() { string[] args = new string[] {}; XElement parameters = null; string outputFileName = null; RunProgram <LynxHare3> .Run( args, Integrator.Euler, parameters, outputFileName, "Timeslice,Lynx,Hares", (TextWriter tw, LynxHare3 s) => tw.WriteLine("{2:0.000}, {0:0.0000000}, {1:0.000000}", s.Lynx, s.Hares, s.TimeSliceNdx *s.TimeStep)); RunProgram <LynxHare3> .Run( args, Integrator.RK4, parameters, outputFileName, "Timeslice,Lynx,Hares", (TextWriter tw, LynxHare3 s) => tw.WriteLine("{2:0.000}, {0:0.0000000}, {1:0.000000}", s.Lynx, s.Hares, s.TimeSliceNdx *s.TimeStep)); }
public void Setup() { _runServiceMock = new Mock <IRunService>(); _sut = new RunProgram(_runServiceMock.Object); fixture = new Fixture(); }
static void Main(string[] args) { //RunProgram.runToList(); RunProgram.runWhere(); }
public static ActionBase GetAction(Enums.ActionTypeId id) { ActionBase action = null; switch (id) { case Enums.ActionTypeId.RunProgram: action = new RunProgram(); break; case Enums.ActionTypeId.Sleep: action = new SleepAction(); break; case Enums.ActionTypeId.VariablesOperations: action = new VariablesAction(); break; case Enums.ActionTypeId.TextOperations: action = new TextManipulationAction(); break; case Enums.ActionTypeId.Lable: action = new LabelAction(); break; case Enums.ActionTypeId.Conditions: action = new ConditionAction(); break; case Enums.ActionTypeId.Rs232Operations: action = new Rs232Action(); break; case Enums.ActionTypeId.Timers: action = new TimersAction(); break; case Enums.ActionTypeId.SSH: action = new SshAction(); break; case Enums.ActionTypeId.Telnet: action = new TelentAction(); break; case Enums.ActionTypeId.Sftp: action = new SftpAction(); break; case Enums.ActionTypeId.Sqlite: action = new SqliteAction(); break; case Enums.ActionTypeId.Table: action = new TableAction(); break; case Enums.ActionTypeId.GuiAutomation: action = new AutoItUiAction(); break; case Enums.ActionTypeId.MessageBox: action = new MessageAction(); break; case Enums.ActionTypeId.RelayControl: action = new RelayControlAction(); break; case Enums.ActionTypeId.WaynSim: action = new WaynPumpAction(); break; case Enums.ActionTypeId.ScriptExecute: action = new ScriptAction(); break; case Enums.ActionTypeId.Ping: action = new PingAction(); break; case Enums.ActionTypeId.Horison80PowerSupplyAction: action = new Horison80PowerSupplyAction(); break; case Enums.ActionTypeId.MotorController: action = new MotorControllerAction(); break; case Enums.ActionTypeId.FileInfo: action = new FileAction(); break; case Enums.ActionTypeId.SystemAction: action = new SystemAction(); break; case Enums.ActionTypeId.EmailAction: action = new EmailAction(); break; case Enums.ActionTypeId.DateTime: action = new DateTimeAction(); break; case Enums.ActionTypeId.ListAction: action = new ListAction(); break; case Enums.ActionTypeId.DictionaryAction: action = new DictionaryAction(); break; case Enums.ActionTypeId.SwitchAction: action = new SwitchAction(); break; case Enums.ActionTypeId.ServerComAction: action = new RemoteServerAction(); break; } action.Details.Clear(); return action; }
private static void Main(string[] args) { RunProgram run = new RunProgram(); run.StartProgram(); }