From 05d1d0f9c6c8b19d568b900e3104505401c163e3 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Thu, 3 Nov 2016 20:02:33 -0700 Subject: [PATCH] Fixed the waiter --- .../CSharpTest/EventHookup/EventHookupTestState.cs | 11 ++++++++++- src/EditorFeatures/Test/EditorServicesTest.csproj | 1 - .../EventHookup/EventHookupWaiter.cs | 0 .../TestUtilities/ServicesTestUtilities.csproj | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) rename src/EditorFeatures/{Test => TestUtilities}/EventHookup/EventHookupWaiter.cs (100%) diff --git a/src/EditorFeatures/CSharpTest/EventHookup/EventHookupTestState.cs b/src/EditorFeatures/CSharpTest/EventHookup/EventHookupTestState.cs index 7c9b305c181..c0ae05f0d98 100644 --- a/src/EditorFeatures/CSharpTest/EventHookup/EventHookupTestState.cs +++ b/src/EditorFeatures/CSharpTest/EventHookup/EventHookupTestState.cs @@ -7,11 +7,15 @@ using System.Threading; using System.Xml.Linq; using Microsoft.CodeAnalysis.Editor.CSharp.EventHookup; +using Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.EventHookup; using Microsoft.CodeAnalysis.Editor.Implementation.Commands; using Microsoft.CodeAnalysis.Editor.UnitTests; using Microsoft.CodeAnalysis.Editor.UnitTests.Extensions; using Microsoft.CodeAnalysis.Options; using Xunit; +using System.ComponentModel.Composition; +using System.ComponentModel.Composition.Primitives; +using Microsoft.VisualStudio.Composition; namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.EventHookup { @@ -21,7 +25,7 @@ internal sealed class EventHookupTestState : AbstractCommandHandlerTestState private Mutex _testSessionHookupMutex; public EventHookupTestState(XElement workspaceElement, IDictionary options) - : base(workspaceElement, null, false) + : base(workspaceElement, GetExtraParts(), false) { CommandHandlerService t = (CommandHandlerService)Workspace.GetService().GetService(Workspace.Documents.Single().TextBuffer); var field = t.GetType().GetField("_commandHandlers", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance); @@ -33,6 +37,11 @@ public EventHookupTestState(XElement workspaceElement, IDictionary options = null) { var workspaceXml = string.Format(@" diff --git a/src/EditorFeatures/Test/EditorServicesTest.csproj b/src/EditorFeatures/Test/EditorServicesTest.csproj index 3612a321fe4..02e15ebfa65 100644 --- a/src/EditorFeatures/Test/EditorServicesTest.csproj +++ b/src/EditorFeatures/Test/EditorServicesTest.csproj @@ -179,7 +179,6 @@ - diff --git a/src/EditorFeatures/Test/EventHookup/EventHookupWaiter.cs b/src/EditorFeatures/TestUtilities/EventHookup/EventHookupWaiter.cs similarity index 100% rename from src/EditorFeatures/Test/EventHookup/EventHookupWaiter.cs rename to src/EditorFeatures/TestUtilities/EventHookup/EventHookupWaiter.cs diff --git a/src/EditorFeatures/TestUtilities/ServicesTestUtilities.csproj b/src/EditorFeatures/TestUtilities/ServicesTestUtilities.csproj index 8893a186470..043cce105e8 100644 --- a/src/EditorFeatures/TestUtilities/ServicesTestUtilities.csproj +++ b/src/EditorFeatures/TestUtilities/ServicesTestUtilities.csproj @@ -185,6 +185,7 @@ + -- GitLab