From ec0a6d97cef6fa015685651191c79504e5d2cc1f Mon Sep 17 00:00:00 2001 From: David Alpert Date: Fri, 15 Jun 2007 14:41:31 +0000 Subject: [PATCH] fixed the unit test that was breaking the build. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2554 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../NavigationService/NavigationService.cs | 26 +++++++++---------- .../NavigationServiceTestFixture.cs | 1 + 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs b/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs index 26651ed9d9..e65eb5bc93 100644 --- a/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs +++ b/src/Main/Base/Project/Src/Services/NavigationService/NavigationService.cs @@ -217,23 +217,20 @@ namespace ICSharpCode.SharpDevelop OnHistoryChanged(); } -/* // untested + // Unit test covered but the test does not yet verify the results. public static INavigationPoint Log() { -// IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; -// if (window == null) { -// return null; -// } -// -// IViewContent view = window.ViewContent; -// if (view == null) { -// return null; -// } -// -// return view.BuildNavPoint(); - return null; + if (WorkbenchSingleton.Workbench == null) { + return null; + } + IViewContent view = WorkbenchSingleton.Workbench.ActiveViewContent; + if (view == null) { + return null; + } + + return view.BuildNavPoint(); } -*/ + /// /// Gets a of the that /// are currently in the collection. @@ -452,3 +449,4 @@ namespace ICSharpCode.SharpDevelop + diff --git a/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs b/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs index c9a5dc8101..7f00160e9a 100644 --- a/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs +++ b/src/Main/Base/Test/Services_Navigation/NavigationServiceTestFixture.cs @@ -632,3 +632,4 @@ namespace NavigationServiceTests #endregion } } +