public async void StartRunTestOverAllSuccessTest(string homeExercisePath1) { //Arrange HomeExercise homeExercise1 = new HomeExercise() { HomeExercisePath = homeExercisePath1 }; List <HomeExercise> homeExercises = new List <HomeExercise>(); homeExercises.Add(homeExercise1); string inputFilePath = @"C:\Users\anton\Desktop\HETS.Project\Matala3\JavaExercises\Exc1\HW1-inout\in1.txt"; string outputFilePath = @"C:\Users\anton\Desktop\HETS.Project\Matala3\JavaExercises\Exc1\HW1-inout\out1.txt"; string input = InputOutputParser.Parser(inputFilePath); string output = InputOutputParser.Parser(outputFilePath); InputOutputModel inputOutputModel = new InputOutputModel() { InputText = input, OutputText = output }; List <InputOutputModel> inputOutputModels = new List <InputOutputModel>(); inputOutputModels.Add(inputOutputModel); int secondsToWait = 5; //Act await RunTest.StartRunTest(homeExercises, inputOutputModels, secondsToWait); //Assert Assert.NotNull(homeExercise1.IsRunTestOk); }
//called on Add I/O files click private void ExecuteAddIOFiles() { OpenFileDialog openFileDialog = new OpenFileDialog(); Nullable <bool> result = openFileDialog.ShowDialog(); if (result == true) { var tempIOModel = new InputOutputModel { InputTextFullPath = System.IO.Path.GetFullPath(openFileDialog.FileName), InputText = InputOutputParser.Parser(openFileDialog.FileName) }; ExecuteAddOutputFile(tempIOModel); } }
//called on Add Output File click private void ExecuteAddOutputFile(InputOutputModel inputOutputModel) { OpenFileDialog openFileDialog = new OpenFileDialog(); Nullable <bool> result = openFileDialog.ShowDialog(); if (result == true) { string output = InputOutputParser.Parser(openFileDialog.FileName); if (inputOutputModel != null) { inputOutputModel.OutputText = output; InputOutputModels.Add(inputOutputModel); } else { InputOutputModels.Add(new Services.InputOutputModel { OutputText = output }); } } }