bb1a2206b4
* Assembly reload didn't remove all test cases properly as it needed to compare file names with a case-insensitive match. * Add "Discovering tests..." text to assembly view while loading tests.
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using GalaSoft.MvvmLight;
|
|
using System.IO;
|
|
|
|
namespace xunit.runner.wpf.ViewModel
|
|
{
|
|
public class TestAssemblyViewModel : ViewModelBase
|
|
{
|
|
private readonly AssemblyAndConfigFile _assembly;
|
|
private bool _isSelected;
|
|
private AssemblyState _state;
|
|
|
|
public TestAssemblyViewModel(AssemblyAndConfigFile assembly)
|
|
{
|
|
_assembly = assembly;
|
|
}
|
|
|
|
public string FileName => _assembly.AssemblyFileName;
|
|
public string ConfigFileName => Path.GetFileNameWithoutExtension(_assembly.ConfigFileName);
|
|
public string DisplayName => Path.GetFileNameWithoutExtension(_assembly.AssemblyFileName);
|
|
|
|
public bool IsSelected
|
|
{
|
|
get { return _isSelected; }
|
|
set { Set(ref _isSelected, value, nameof(IsSelected)); }
|
|
}
|
|
|
|
public AssemblyState State
|
|
{
|
|
get { return _state; }
|
|
set { Set(ref _state, value, nameof(State)); }
|
|
}
|
|
}
|
|
|
|
public enum AssemblyState
|
|
{
|
|
Ready,
|
|
Loading
|
|
}
|
|
}
|