Respond to PR feedback
This commit is contained in:
Родитель
ad66e46217
Коммит
a3cfe6c3c5
|
@ -45,7 +45,7 @@
|
||||||
<Compile Include="Constants.cs" />
|
<Compile Include="Constants.cs" />
|
||||||
<Compile Include="TestCaseData.cs" />
|
<Compile Include="TestCaseData.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="TestItem.cs" />
|
<Compile Include="TestDataKind.cs" />
|
||||||
<Compile Include="TestResultData.cs" />
|
<Compile Include="TestResultData.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace xunit.runner.worker
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Dispose()
|
internal void Dispose()
|
||||||
{
|
{
|
||||||
if (_closed)
|
if (_closed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,10 @@ namespace xunit.runner.worker
|
||||||
|
|
||||||
private static void Usage()
|
private static void Usage()
|
||||||
{
|
{
|
||||||
Console.Error.WriteLine("Need at least two arguments");
|
Console.WriteLine("xunit.runner.worker [pipe name] [action] [assembly path]");
|
||||||
|
Console.WriteLine("\tpipe name: Name of the pipe this worker should communicate on");
|
||||||
|
Console.WriteLine("\taction: Action performed by the worker (run or discover tests");
|
||||||
|
Console.WriteLine("\assembly path: Path of assembly to perform the action against");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace xunit.runner.wpf
|
||||||
internal interface ITestSession
|
internal interface ITestSession
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Task which will be resolved when the session is completed.
|
/// Task which will be completed when the session is finished.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task Task { get; }
|
Task Task { get; }
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ namespace xunit.runner.wpf
|
||||||
internal interface ITestRunSession : ITestSession
|
internal interface ITestRunSession : ITestSession
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raised when an idividual test is finished running.
|
/// Raised when an individual test is finished running.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<TestResultDataEventArgs> TestFinished;
|
event EventHandler<TestResultDataEventArgs> TestFinished;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ namespace xunit.runner.wpf
|
||||||
internal interface ITestDiscoverSession : ITestSession
|
internal interface ITestDiscoverSession : ITestSession
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raised when an idividual test is finished running.
|
/// Raised when an individual test is finished running.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<TestCaseDataEventArgs> TestDiscovered;
|
event EventHandler<TestCaseDataEventArgs> TestDiscovered;
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ namespace xunit.runner.wpf.Impl
|
||||||
{
|
{
|
||||||
_callback(null);
|
_callback(null);
|
||||||
_timer.Stop();
|
_timer.Stop();
|
||||||
_connection.Close();
|
_connection.Dispose();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace xunit.runner.wpf.Impl
|
||||||
_reader = new ClientReader(stream);
|
_reader = new ClientReader(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Close()
|
internal void Dispose()
|
||||||
{
|
{
|
||||||
if (_process != null)
|
if (_process != null)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace xunit.runner.wpf.Impl
|
||||||
|
|
||||||
void IDisposable.Dispose()
|
void IDisposable.Dispose()
|
||||||
{
|
{
|
||||||
Close();
|
Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,16 +235,16 @@ namespace xunit.runner.wpf.ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
this.IsBusy = true;
|
this.IsBusy = true;
|
||||||
this.RunCommand.RaiseCanExecuteChanged();
|
|
||||||
this.CancelCommand.RaiseCanExecuteChanged();
|
|
||||||
await Task.WhenAll(this.testSessionList.Select(x => x.Task));
|
await Task.WhenAll(this.testSessionList.Select(x => x.Task));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(Application.Current.MainWindow, ex.ToString());
|
MessageBox.Show(Application.Current.MainWindow, ex.ToString());
|
||||||
|
this.IsBusy = false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
Debug.Assert(!IsBusy);
|
||||||
loadingDialog.Close();
|
loadingDialog.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,8 +331,7 @@ namespace xunit.runner.wpf.ViewModel
|
||||||
tc.State = TestState.NotRun;
|
tc.State = TestState.NotRun;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Need a way to filter based on traits, selected test cases, etc ... For now we just run
|
// TODO: Need a way to filter based on traits
|
||||||
// everything.
|
|
||||||
|
|
||||||
var runAll = TestCases.Count == this.allTestCases.Count;
|
var runAll = TestCases.Count == this.allTestCases.Count;
|
||||||
|
|
||||||
|
@ -359,8 +358,6 @@ namespace xunit.runner.wpf.ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
this.IsBusy = true;
|
this.IsBusy = true;
|
||||||
this.RunCommand.RaiseCanExecuteChanged();
|
|
||||||
this.CancelCommand.RaiseCanExecuteChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTestSessionFinished(ITestSession session)
|
private void OnTestSessionFinished(ITestSession session)
|
||||||
|
@ -374,8 +371,6 @@ namespace xunit.runner.wpf.ViewModel
|
||||||
{
|
{
|
||||||
this.cancellationTokenSource = null;
|
this.cancellationTokenSource = null;
|
||||||
this.IsBusy = false;
|
this.IsBusy = false;
|
||||||
this.RunCommand.RaiseCanExecuteChanged();
|
|
||||||
this.CancelCommand.RaiseCanExecuteChanged();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче