Index: Application/Ringtoets/src/Application.Ringtoets.Setup/Application.Ringtoets.Setup.wixproj =================================================================== diff -u -r09e90355a8109e106df93ebf628b247a49abdae7 -r30332db4c8d709bbb543c5085345fb22a9e4809e --- Application/Ringtoets/src/Application.Ringtoets.Setup/Application.Ringtoets.Setup.wixproj (.../Application.Ringtoets.Setup.wixproj) (revision 09e90355a8109e106df93ebf628b247a49abdae7) +++ Application/Ringtoets/src/Application.Ringtoets.Setup/Application.Ringtoets.Setup.wixproj (.../Application.Ringtoets.Setup.wixproj) (revision 30332db4c8d709bbb543c5085345fb22a9e4809e) @@ -65,6 +65,7 @@ + @@ -73,7 +74,6 @@ - Index: Application/Ringtoets/src/Application.Ringtoets.Setup/Handleiding_Ringtoets_16.1.1.pdf =================================================================== diff -u Binary files differ Index: Application/Ringtoets/src/Application.Ringtoets.Setup/Product.wxs =================================================================== diff -u -r8e254606bacf5c5a7e39c83394aed8e88d315eb3 -r30332db4c8d709bbb543c5085345fb22a9e4809e --- Application/Ringtoets/src/Application.Ringtoets.Setup/Product.wxs (.../Product.wxs) (revision 8e254606bacf5c5a7e39c83394aed8e88d315eb3) +++ Application/Ringtoets/src/Application.Ringtoets.Setup/Product.wxs (.../Product.wxs) (revision 30332db4c8d709bbb543c5085345fb22a9e4809e) @@ -79,7 +79,7 @@ - + @@ -107,7 +107,7 @@ Index: Application/Ringtoets/src/Application.Ringtoets.Setup/Ringtoets_Manual.pdf =================================================================== diff -u -r15c19c0034704817c0419312dc7a51b26b941361 -r30332db4c8d709bbb543c5085345fb22a9e4809e Binary files differ Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -re05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8 -r30332db4c8d709bbb543c5085345fb22a9e4809e --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision e05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 30332db4c8d709bbb543c5085345fb22a9e4809e) @@ -140,7 +140,7 @@ SupportEmailAddress = "www.helpdeskwater.nl", SupportPhoneNumber = "+31 (0)88-797 7102", MainWindowTitle = "Ringtoets", - ManualFilePath = "..\\Ringtoets_Manual.pdf" + ManualFilePath = "..\\Handleiding_Ringtoets_16.1.1.pdf" }; var mainWindow = new MainWindow(); gui = new GuiCore(mainWindow, new StorageSqLite(), new RingtoetsProjectFactory(), settings) Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj =================================================================== diff -u -rf2be29fe8c407a4f32cb1bfcbaf4816c1f99c83f -r30332db4c8d709bbb543c5085345fb22a9e4809e --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision f2be29fe8c407a4f32cb1bfcbaf4816c1f99c83f) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Demo.Ringtoets.Test.csproj (.../Demo.Ringtoets.Test.csproj) (revision 30332db4c8d709bbb543c5085345fb22a9e4809e) @@ -68,7 +68,7 @@ - + Fisheye: Tag 30332db4c8d709bbb543c5085345fb22a9e4809e refers to a dead (removed) revision in file `Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoestDemoProjectRibbonTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoetsDemoProjectRibbonTest.cs =================================================================== diff -u --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoetsDemoProjectRibbonTest.cs (revision 0) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Ribbons/RingtoetsDemoProjectRibbonTest.cs (revision 30332db4c8d709bbb543c5085345fb22a9e4809e) @@ -0,0 +1,112 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using Core.Common.Gui; +using Core.Common.Gui.Forms.ViewHost; +using Demo.Ringtoets.Ribbons; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Demo.Ringtoets.Test.Ribbons +{ + [TestFixture] + public class RingtoetsDemoProjectRibbonTest + { + [Test] + [RequiresSTA] + public void DefaultConstructor_Always_CreatesControl() + { + // Setup + var mocks = new MockRepository(); + var projectOwner = mocks.Stub(); + var viewController = mocks.Stub(); + mocks.ReplayAll(); + + // Call + var ribbon = new RingtoetsDemoProjectRibbon(projectOwner, viewController); + + // Assert + Assert.IsNotNull(ribbon); + Assert.IsInstanceOf(ribbon.GetRibbonControl()); + mocks.VerifyAll(); + } + + [Test] + [RequiresSTA] + public void OpenChartViewButton_OnClick_ExecutesOpenChartViewCommand() + { + // Setup + var mocks = new MockRepository(); + var documentViewController = mocks.StrictMock(); + documentViewController.Expect(vr => vr.OpenViewForData(null)).IgnoreArguments().Return(true); + + var projectOwner = mocks.Stub(); + var viewController = mocks.Stub(); + viewController.Expect(vc => vc.DocumentViewController).Return(documentViewController); + + mocks.ReplayAll(); + + var ribbon = new RingtoetsDemoProjectRibbon(projectOwner, viewController); + var button = ribbon.GetRibbonControl().FindName("OpenChartViewButton") as Button; + + // Precondition + Assert.IsNotNull(button, "Ribbon should have an open chart view button."); + + // Call + button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); + + // Assert + mocks.VerifyAll(); + } + + [Test] + [RequiresSTA] + public void OpenMapViewButton_OnClick_OpensView() + { + // Setup + var mocks = new MockRepository(); + var documentViewController = mocks.StrictMock(); + documentViewController.Expect(vr => vr.OpenViewForData(null)).IgnoreArguments().Return(true); + + var projectOwner = mocks.Stub(); + var viewController = mocks.Stub(); + viewController.Expect(vc => vc.DocumentViewController).Return(documentViewController); + + mocks.ReplayAll(); + + var ribbon = new RingtoetsDemoProjectRibbon(projectOwner, viewController); + + var button = ribbon.GetRibbonControl().FindName("OpenMapViewButton") as Button; + + // Precondition + Assert.IsNotNull(button, "Ribbon should have an open map view button"); + + // Call + button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); + + // Assert + mocks.VerifyAll(); + } + } +} \ No newline at end of file