Skip to content

Commit

Permalink
Merge pull request #1981 from paulvanbrenk/preUnitTest
Browse files Browse the repository at this point in the history
cleanup namespaces
  • Loading branch information
paulvanbrenk authored May 31, 2018
2 parents 1a3e6ea + 98096c7 commit bfaefdf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 22 deletions.
12 changes: 4 additions & 8 deletions Common/Product/SharedProject/ProcessOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@ public ProcessPriorityClass PriorityClass
/// <param name="line"></param>
public void WriteInputLine(string line)
{
if (IsStarted && redirector != null && !redirector.CloseStandardInput())
if (this.IsStarted && this.redirector != null && !this.redirector.CloseStandardInput())
{
Process.StandardInput.WriteLine(line);
Process.StandardInput.Flush();
this.Process.StandardInput.WriteLine(line);
this.Process.StandardInput.Flush();
}
}

Expand Down Expand Up @@ -824,11 +824,7 @@ private void OnExited(object sender, EventArgs e)
}
this.haveRaisedExitedEvent = true;
FlushAndCloseOutput();
var evt = Exited;
if (evt != null)
{
evt(this, e);
}
Exited?.Invoke(this, e);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Nodejs/Product/TestAdapterImpl/ServiceProviderExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Globalization;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;

namespace Microsoft.VisualStudioTools.TestAdapter
namespace Microsoft.NodejsTools.TestAdapter
{
internal static class ServiceProviderExtensions
{
Expand Down
4 changes: 2 additions & 2 deletions Nodejs/Product/TestAdapterImpl/TestFileAddRemoveListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;

namespace Microsoft.VisualStudioTools.TestAdapter
namespace Microsoft.NodejsTools.TestAdapter
{
internal sealed class TestFileChangedEventArgs : EventArgs
{
Expand All @@ -24,7 +24,7 @@ public TestFileChangedEventArgs(string file, WatcherChangeTypes reason, IVsProje

internal sealed class TestFileAddRemoveListener : IVsTrackProjectDocumentsEvents2, IDisposable
{
private IVsTrackProjectDocuments2 _projectDocTracker;
private readonly IVsTrackProjectDocuments2 _projectDocTracker;
private uint _cookie = VSConstants.VSCOOKIE_NIL;
private Guid _testProjectGuid;

Expand Down
2 changes: 1 addition & 1 deletion Nodejs/Product/TestAdapterImpl/TestFilesUpdateWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;

namespace Microsoft.VisualStudioTools.TestAdapter
namespace Microsoft.NodejsTools.TestAdapter
{
// TODO: consider replacing this with Microsoft.VisualStudioTools.Project.FileChangeManager. (When we have an assembly we can use to share code)

Expand Down
1 change: 0 additions & 1 deletion Nodejs/Product/TestAdapterImpl/TestMethodResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestWindow.Extensibility;
using Microsoft.VisualStudioTools.TestAdapter;
using MSBuild = Microsoft.Build.Evaluation;

namespace Microsoft.NodejsTools.TestAdapter
Expand Down
11 changes: 2 additions & 9 deletions Nodejs/Product/TestAdapterImpl/VsProjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.NodejsTools;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Flavor;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;

namespace Microsoft.VisualStudioTools.TestAdapter
namespace Microsoft.NodejsTools.TestAdapter
{
internal static class VSProjectExtensions
{
Expand Down Expand Up @@ -100,12 +98,7 @@ out var extObject
try
{
var projHome = props.Item("ProjectHome");
if (projHome == null)
{
return null;
}

return projHome.Value as string;
return projHome == null ? null : projHome.Value as string;
}
catch (ArgumentException)
{
Expand Down

0 comments on commit bfaefdf

Please sign in to comment.