4bc641e575
The filter buttons are now unchecked by default, which has the meaning of no filter applied. Clicking the filter buttons the applies that filter. In addition, we now mark skipped tests when they are discovered.
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Collections.Immutable;
|
|
using GalaSoft.MvvmLight;
|
|
using Xunit.Runner.Data;
|
|
|
|
namespace Xunit.Runner.Wpf.ViewModel
|
|
{
|
|
public class TestCaseViewModel : ViewModelBase
|
|
{
|
|
private TestState _state = TestState.NotRun;
|
|
|
|
public string DisplayName { get; }
|
|
public string SkipReason { get; }
|
|
public string AssemblyFileName { get; }
|
|
public ImmutableArray<TraitViewModel> Traits { get; }
|
|
|
|
public bool HasSkipReason => !string.IsNullOrEmpty(this.SkipReason);
|
|
|
|
public TestState State
|
|
{
|
|
get { return _state; }
|
|
set { Set(ref _state, value); }
|
|
}
|
|
|
|
public TestCaseViewModel(string displayName, string skipReason, string assemblyFileName, IEnumerable<TraitViewModel> traits)
|
|
{
|
|
this.DisplayName = displayName;
|
|
this.SkipReason = skipReason;
|
|
this.AssemblyFileName = assemblyFileName;
|
|
this.Traits = traits.ToImmutableArray();
|
|
|
|
if (!string.IsNullOrEmpty(skipReason))
|
|
{
|
|
_state = TestState.Skipped;
|
|
}
|
|
}
|
|
}
|
|
}
|