diff --git a/xunit.runner.wpf/MainWindow.xaml b/xunit.runner.wpf/MainWindow.xaml
index ab54485..880f4ce 100644
--- a/xunit.runner.wpf/MainWindow.xaml
+++ b/xunit.runner.wpf/MainWindow.xaml
@@ -110,7 +110,7 @@
-
diff --git a/xunit.runner.wpf/ViewModel/MainViewModel.cs b/xunit.runner.wpf/ViewModel/MainViewModel.cs
index 1567f47..96b9bba 100644
--- a/xunit.runner.wpf/ViewModel/MainViewModel.cs
+++ b/xunit.runner.wpf/ViewModel/MainViewModel.cs
@@ -9,6 +9,7 @@ using Xunit.Abstractions;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
+using System.Collections.Specialized;
namespace xunit.runner.wpf.ViewModel
{
@@ -16,22 +17,38 @@ namespace xunit.runner.wpf.ViewModel
{
public MainViewModel()
{
- ////if (IsInDesignMode)
- ////{
- //// // Code runs in Blend --> create design time data.
- ////}
+ if (IsInDesignMode)
+ {
+ this.Assemblies.Add(new TestAssemblyViewModel(@"C:\Code\TestAssembly.dll"));
+ this.TestCases.Add("A.B.Test()");
+ }
////else
////{
//// // Code runs "for real"
////}
CommandBindings = CreateCommandBindings();
+ this.MethodsCaption = "Methods (0)";
+
+ this.TestCases.CollectionChanged += TestCases_CollectionChanged;
+ }
+
+ private void TestCases_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ MethodsCaption = $"Methods ({TestCases.Count})";
}
public ICommand ExitCommand { get; } = new RelayCommand(OnExecuteExit);
public CommandBindingCollection CommandBindings { get; }
+ private string methodsCaption;
+ public string MethodsCaption
+ {
+ get { return methodsCaption; }
+ private set { Set(ref methodsCaption, value); }
+ }
+
private CommandBindingCollection CreateCommandBindings()
{
var openBinding = new CommandBinding(ApplicationCommands.Open, OnExecuteOpen);