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 Start Test click private async void ExecuteStartTest() { try { CanStartTest = false; await RunTest.StartRunTest(_homeExercises, InputOutputModels, NumberOfSecondsToWait, _eventAggregator); // change view to ResultsView and publish changes in _homeExercises _eventAggregator.GetEvent <UpdateHomeExercisesEvent>().Publish(_homeExercises); _regionManager.RequestNavigate("ContentRegion", "ResultsView"); } catch (Exception e) { MessageBox.Show(e.Message); } finally { CanStartTest = true; _eventAggregator.GetEvent <UpdateProgressBarEvent>().Publish(0); } }