-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lsp-code-actions
- Loading branch information
Showing
33 changed files
with
360 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 13 additions & 3 deletions
16
...DotNetTest/Models/BaseTestClassRequest.cs → ...harp.DotNetTest/Models/BaseTestRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
using OmniSharp.Models; | ||
using OmniSharp.Models; | ||
|
||
namespace OmniSharp.DotNetTest.Models | ||
{ | ||
public class BaseTestClassRequest : Request | ||
public class BaseTestRequest : Request | ||
{ | ||
public string[] MethodNames { get; set; } | ||
public string RunSettings { get; set; } | ||
public string TestFrameworkName { get; set; } | ||
|
||
/// <summary> | ||
/// e.g. .NETCoreApp, Version=2.0 | ||
/// </summary> | ||
public string TargetFrameworkVersion { get; set; } | ||
public bool NoBuild { get; set; } = false; | ||
} | ||
|
||
public class SingleTestRequest : BaseTestRequest | ||
{ | ||
public string MethodName { get; set; } | ||
} | ||
|
||
public class MultiTestRequest : BaseTestRequest | ||
{ | ||
public string[] MethodNames { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using OmniSharp.Mef; | ||
using OmniSharp.Models; | ||
|
||
namespace OmniSharp.DotNetTest.Models | ||
{ | ||
[OmniSharpEndpoint(OmniSharpEndpoints.V2.DiscoverTests, typeof(DiscoverTestsRequest), typeof(DiscoverTestsResponse))] | ||
public class DiscoverTestsRequest : BaseTestRequest | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace OmniSharp.DotNetTest.Models | ||
{ | ||
public class Test | ||
{ | ||
public string FullyQualifiedName { get; set; } | ||
|
||
public string DisplayName { get; set; } | ||
|
||
public string Source { get; set; } | ||
|
||
public string CodeFilePath { get; set; } | ||
|
||
public int LineNumber { get; set; } | ||
} | ||
|
||
public class DiscoverTestsResponse | ||
{ | ||
public Test[] Tests { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Composition; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis; | ||
using Microsoft.Extensions.Logging; | ||
using OmniSharp.DotNetTest.Models; | ||
using OmniSharp.Eventing; | ||
using OmniSharp.Mef; | ||
using OmniSharp.Services; | ||
|
||
namespace OmniSharp.DotNetTest.Services | ||
{ | ||
[OmniSharpHandler(OmniSharpEndpoints.V2.DiscoverTests, LanguageNames.CSharp)] | ||
internal class DiscoverTestsService : BaseTestService<DiscoverTestsRequest, DiscoverTestsResponse> | ||
{ | ||
[ImportingConstructor] | ||
public DiscoverTestsService(OmniSharpWorkspace workspace, IDotNetCliService dotNetCli, IEventEmitter eventEmitter, ILoggerFactory loggerFactory) | ||
: base(workspace, dotNetCli, eventEmitter, loggerFactory) | ||
{ | ||
} | ||
|
||
protected override async Task<DiscoverTestsResponse> HandleRequest(DiscoverTestsRequest request, TestManager testManager) | ||
{ | ||
if (testManager.IsConnected) | ||
{ | ||
return await testManager.DiscoverTestsAsync(request.RunSettings, request.TestFrameworkName, request.TargetFrameworkVersion, default(CancellationToken)); | ||
} | ||
|
||
throw new InvalidOperationException("The debugger could not be started"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.