Index: Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs
===================================================================
diff -u -rda060e2fbb88d443f8322e761ef7db109194d37e -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e)
+++ Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml.cs (.../AvalonDockViewHost.xaml.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -29,6 +29,7 @@
using Core.Common.Controls.Views;
using Core.Common.Util.Drawing;
using Xceed.Wpf.AvalonDock.Layout;
+using FontFamily = System.Windows.Media.FontFamily;
namespace Core.Gui.Forms.ViewHost
{
@@ -104,7 +105,7 @@
}
}
- public void AddDocumentView(IView view, string title, string symbol)
+ public void AddDocumentView(IView view, string title, string symbol, FontFamily fontFamily)
{
var control = view as Control;
if (control == null)
@@ -127,7 +128,8 @@
{
Title = title,
Content = hostControl,
- Symbol = symbol
+ Symbol = symbol,
+ FontFamily = fontFamily
};
PerformWithoutChangingActiveContent(() => AddLayoutDocument(layoutDocument));
Index: Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs
===================================================================
diff -u -rb88f450a82941a6b6ec0c29dd117248f9572086c -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision b88f450a82941a6b6ec0c29dd117248f9572086c)
+++ Core/Gui/src/Core.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -23,6 +23,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
+using System.Windows.Media;
using Core.Common.Controls.Views;
using Core.Common.Util.Reflection;
using Core.Gui.Plugin;
@@ -173,7 +174,7 @@
openedViewLookup.Add(data, view);
- viewHost.AddDocumentView(view.Item1, viewInfo.GetViewName(view.Item1, data), string.Empty);
+ viewHost.AddDocumentView(view.Item1, viewInfo.GetViewName(view.Item1, data), string.Empty, new FontFamily());
viewHost.SetImage(view.Item1, viewInfo.Image);
}
Index: Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs
===================================================================
diff -u -rda060e2fbb88d443f8322e761ef7db109194d37e -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs (.../IViewHost.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e)
+++ Core/Gui/src/Core.Gui/Forms/ViewHost/IViewHost.cs (.../IViewHost.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -23,6 +23,7 @@
using System.Collections.Generic;
using System.Drawing;
using Core.Common.Controls.Views;
+using FontFamily = System.Windows.Media.FontFamily;
namespace Core.Gui.Forms.ViewHost
{
@@ -82,8 +83,9 @@
/// The document view to add.
/// The title to show.
/// The symbol to show.
+ /// The font family the symbol belong to.
///
- void AddDocumentView(IView view, string title, string symbol);
+ void AddDocumentView(IView view, string title, string symbol, FontFamily fontFamily);
///
/// Adds a tool view.
Index: Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs
===================================================================
diff -u -rda060e2fbb88d443f8322e761ef7db109194d37e -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs (.../MainWindowTest.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e)
+++ Core/Gui/test/Core.Gui.Test/Forms/Main/MainWindowTest.cs (.../MainWindowTest.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -656,7 +656,7 @@
Assert.IsNull(GetMapControl(mapLegendView));
// When
- gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty, null);
// Then
Assert.AreSame(view.Map, GetMapControl(mapLegendView));
@@ -687,8 +687,8 @@
var view2 = new TestMapView();
MapLegendView mapLegendView = mainWindow.MapLegendView;
- gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty);
- gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty, null);
+ gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view2.Map, GetMapControl(mapLegendView));
@@ -724,7 +724,7 @@
var view = new TestMapView();
MapLegendView mapLegendView = mainWindow.MapLegendView;
- gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view.Map, GetMapControl(mapLegendView));
@@ -761,8 +761,8 @@
var view2 = new TestMapView();
MapLegendView mapLegendView = mainWindow.MapLegendView;
- gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty);
- gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty, null);
+ gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view2.Map, GetMapControl(mapLegendView));
@@ -802,7 +802,7 @@
Assert.IsNull(GetChartControl(chartLegendView));
// When
- gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty, null);
// Then
Assert.AreSame(view.Chart, GetChartControl(chartLegendView));
@@ -833,8 +833,8 @@
var view2 = new TestChartView();
ChartLegendView chartLegendView = mainWindow.ChartLegendView;
- gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty);
- gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty, null);
+ gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view2.Chart, GetChartControl(chartLegendView));
@@ -870,7 +870,7 @@
var view = new TestChartView();
ChartLegendView chartLegendView = mainWindow.ChartLegendView;
- gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view.Chart, GetChartControl(chartLegendView));
@@ -907,8 +907,8 @@
var view2 = new TestChartView();
ChartLegendView chartLegendView = mainWindow.ChartLegendView;
- gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty);
- gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(view1, string.Empty, string.Empty, null);
+ gui.ViewHost.AddDocumentView(view2, string.Empty, string.Empty, null);
// Precondition
Assert.AreSame(view2.Chart, GetChartControl(chartLegendView));
@@ -1332,7 +1332,7 @@
mainWindow.SetGui(gui);
- gui.ViewHost.AddDocumentView(new TestView(), string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(new TestView(), string.Empty, string.Empty, null);
// When
bool canExecute = mainWindow.CloseViewTabCommand.CanExecute(null);
Index: Core/Gui/test/Core.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs
===================================================================
diff -u -r919a438d2f95f8c60d77f8450f312bf516a643a4 -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/test/Core.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs (.../AvalonDockViewHostTest.cs) (revision 919a438d2f95f8c60d77f8450f312bf516a643a4)
+++ Core/Gui/test/Core.Gui.Test/Forms/ViewHost/AvalonDockViewHostTest.cs (.../AvalonDockViewHostTest.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -71,8 +71,8 @@
var avalonDockViewHost = new AvalonDockViewHost();
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
avalonDockViewHost.AddToolView(testView3, ToolViewLocation.Left, string.Empty, string.Empty);
avalonDockViewHost.AddToolView(testView4, ToolViewLocation.Left, string.Empty, string.Empty);
@@ -124,7 +124,7 @@
avalonDockViewHost.ViewOpened += (sender, args) => viewOpenedCounter++;
// Call
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
// Assert
CollectionAssert.IsEmpty(avalonDockViewHost.DocumentViews);
@@ -160,7 +160,7 @@
viewList.Add(testView);
// Call
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
}
// Assert
@@ -179,16 +179,18 @@
{
const string title = "Random title";
const string symbol = "Random symbol";
+ var fontFamily = new System.Windows.Media.FontFamily();
var testView = new TestView();
// Call
- avalonDockViewHost.AddDocumentView(testView, title, symbol);
+ avalonDockViewHost.AddDocumentView(testView, title, symbol, fontFamily);
// Assert
CustomLayoutDocument layoutDocument = GetLayoutDocument(avalonDockViewHost, testView);
Assert.AreEqual(title, layoutDocument.Title);
Assert.AreEqual(symbol, layoutDocument.Symbol);
+ Assert.AreSame(fontFamily, layoutDocument.FontFamily);
}
}
@@ -200,7 +202,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
var viewOpenedCounter = 0;
avalonDockViewHost.ViewOpened += (sender, args) => viewOpenedCounter++;
@@ -213,7 +215,7 @@
avalonDockViewHost.DocumentViews);
// Call
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
// Assert
CollectionAssert.AreEqual(
@@ -235,8 +237,8 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
// Precondition
CollectionAssert.AreEqual(
@@ -271,7 +273,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
avalonDockViewHost.ViewClosed += (sender, args) =>
{
@@ -300,7 +302,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
avalonDockViewHost.AddToolView(testView2, ToolViewLocation.Left, string.Empty, string.Empty);
SetActiveView(avalonDockViewHost, testView1);
@@ -334,10 +336,10 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty, null);
avalonDockViewHost.AddToolView(testView5, ToolViewLocation.Left, string.Empty, string.Empty);
SetActiveView(avalonDockViewHost, testView1);
@@ -375,10 +377,10 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty, null);
avalonDockViewHost.AddToolView(testView5, ToolViewLocation.Left, string.Empty, string.Empty);
SetActiveView(avalonDockViewHost, testView3);
@@ -414,8 +416,8 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
SetActiveView(avalonDockViewHost, testView1);
avalonDockViewHost.ViewBroughtToFront += (sender, args) => viewBroughtToFrontCounter++;
@@ -449,8 +451,8 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
SetActiveView(avalonDockViewHost, testView2);
avalonDockViewHost.ViewBroughtToFront += (sender, args) => viewBroughtToFrontCounter++;
@@ -481,7 +483,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
// Precondition
Assert.IsFalse(AvalonDockViewHostTestHelper.IsTitleSet(avalonDockViewHost, testView, titleToSet));
@@ -502,7 +504,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
// Precondition
Assert.IsFalse(IsImageSet(avalonDockViewHost, testView));
@@ -639,7 +641,7 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testDocumentView, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testDocumentView, string.Empty, string.Empty, null);
SetActiveView(avalonDockViewHost, testDocumentView);
// Call
@@ -756,10 +758,10 @@
using (var avalonDockViewHost = new AvalonDockViewHost())
{
- avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty);
- avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty);
+ avalonDockViewHost.AddDocumentView(testView1, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView2, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView3, string.Empty, string.Empty, null);
+ avalonDockViewHost.AddDocumentView(testView4, string.Empty, string.Empty, null);
avalonDockViewHost.AddToolView(testView5, ToolViewLocation.Left, string.Empty, string.Empty);
SetActiveView(avalonDockViewHost, testView3);
Index: Core/Gui/test/Core.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs
===================================================================
diff -u -rb88f450a82941a6b6ec0c29dd117248f9572086c -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/test/Core.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs (.../DocumentViewControllerTest.cs) (revision b88f450a82941a6b6ec0c29dd117248f9572086c)
+++ Core/Gui/test/Core.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs (.../DocumentViewControllerTest.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -22,6 +22,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
+using System.Windows.Media;
using Core.Common.Controls.Views;
using Core.Gui.Forms.ViewHost;
using Core.Gui.Plugin;
@@ -137,7 +138,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Equal(viewName),
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -197,13 +199,14 @@
var viewHost = mocks.StrictMock();
const string viewName = "";
-
+
viewHost.Stub(vh => vh.ViewClosed += null).IgnoreArguments();
viewHost.Stub(vh => vh.ViewClosed -= null).IgnoreArguments();
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Equal(viewName),
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -261,7 +264,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestViewDerivative; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -303,7 +307,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -345,7 +350,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestViewDerivative; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -433,7 +439,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -482,7 +489,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -538,7 +546,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestView; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -595,7 +604,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { view = invocation.Arguments[0] as TestViewDerivative; });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
@@ -640,10 +650,12 @@
viewHost.Stub(vh => vh.DocumentViews).Return(new IView[0]);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Matches(c => c.Data == data1),
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)));
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull));
viewHost.Expect(vm => vm.AddDocumentView(Arg.Matches(c => c.Data == data2),
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)));
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull));
viewHost.Stub(vh => vh.SetImage(null, null)).IgnoreArguments();
mocks.ReplayAll();
@@ -679,7 +691,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(viewList);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => viewList.Add(invocation.Arguments[0] as TestView));
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
viewHost.Expect(vh => vh.BringToFront(Arg.Matches(c => c == viewList.First())));
@@ -869,7 +882,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(documentViews);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { documentViews.Add(invocation.Arguments[0] as TestView); })
.Repeat.Twice();
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments().Repeat.Twice();
@@ -960,7 +974,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(documentViews);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { documentViews.Add(invocation.Arguments[0] as TestView); })
.Repeat.Twice();
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments().Repeat.Twice();
@@ -1002,7 +1017,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(documentViews);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { documentViews.Add(invocation.Arguments[0] as TestView); })
.Repeat.Twice();
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments().Repeat.Twice();
@@ -1047,7 +1063,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(documentViews);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { documentViews.Add(invocation.Arguments[0] as TestView); })
.Repeat.Twice();
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments().Repeat.Twice();
@@ -1110,7 +1127,8 @@
viewHost.Stub(vh => vh.DocumentViews).Return(documentViews);
viewHost.Expect(vm => vm.AddDocumentView(Arg.Is.NotNull,
Arg.Is.Anything,
- Arg.Is.Equal(string.Empty)))
+ Arg.Is.Equal(string.Empty),
+ Arg.Is.NotNull))
.WhenCalled(invocation => { documentViews.Add(invocation.Arguments[0] as TestView); });
viewHost.Expect(vh => vh.SetImage(null, null)).IgnoreArguments();
viewHost.Expect(vh => vh.Remove(Arg.Is.NotNull))
Index: Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs
===================================================================
diff -u -rda060e2fbb88d443f8322e761ef7db109194d37e -r54cce925f5a723820f5490293019ef785ae531fd
--- Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision da060e2fbb88d443f8322e761ef7db109194d37e)
+++ Core/Gui/test/Core.Gui.Test/GuiCoreTest.cs (.../GuiCoreTest.cs) (revision 54cce925f5a723820f5490293019ef785ae531fd)
@@ -421,7 +421,7 @@
var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings());
gui.Run();
- gui.ViewHost.AddDocumentView(documentView, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(documentView, string.Empty, string.Empty, null);
// Call
gui.Dispose();
@@ -1282,7 +1282,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
// Precondition
Assert.IsNull(gui.Selection);
@@ -1312,7 +1312,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
gui.Selection = new object();
@@ -1341,7 +1341,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider);
gui.Selection = new object();
@@ -1372,7 +1372,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider);
gui.ViewHost.Remove(selectionProvider);
@@ -1405,7 +1405,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
gui.Selection = selection;
@@ -1435,7 +1435,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(testView, string.Empty, string.Empty, null);
gui.Selection = selection;
@@ -1464,7 +1464,7 @@
using (var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings()))
{
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider);
// Precondition
@@ -1494,7 +1494,7 @@
var gui = new GuiCore(new MainWindow(), projectStore, projectMigrator, projectFactory, new GuiCoreSettings());
gui.Run();
- gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty);
+ gui.ViewHost.AddDocumentView(selectionProvider, string.Empty, string.Empty, null);
SetActiveView((AvalonDockViewHost) gui.ViewHost, selectionProvider);
gui.Dispose();