private async void ButtonStart(object sender, RoutedEventArgs e) { BtnStart.IsEnabled = false; try { logContainer.Add(@"cmbTests.SelectedItem : {0}", CmbTests.SelectedItem); logContainer.Add(@"cmbTests.SelectedValue: {0}", CmbTests.SelectedValue); var ctx = new TestCtx(logContainer, Settings.Default.HostA, Settings.Default.HostB); var test = (ITest)CmbTests.SelectedItem; var runner = new TestRunner(test, ctx); await runner.Run(); UpdateTrace(runner.GetTrace()); } finally { BtnStart.IsEnabled = true; } }
public async Task PauseWithoutBackgroundActions(int ms) { log.Add(@"PauseWithoutBackgroundActions {0}", ms); await Task.Delay(ms); }
public async Task <SetupResult> Setup(string directorVersion) { log.Add($@"[{Host}] Setup {directorVersion}"); var rq = new XferItem { Category = Category.REQ, CallIndex = 0, Name = "Setup", Parameters = new Parameter[] { new ParameterValue("ChabuTestDirectorVersion", Constants.DirectorVersion), new ParameterValue("NodeLabel", Host.ToString()), } }; var rs = await XferAndCheckError(rq); SetupResult res; res.ChabuProtocolVersion = rs.GetString("ChabuProtocolVersion"); res.Implemenation = (Implemenation)Enum.Parse(typeof(Implemenation), rs.GetString("Implementation")); return(res); }