Skip to content

Commit 79beade

Browse files
committed
chore(ImplementationTests): add (non-functional) tests for textDocument/implementation
1 parent 922bd5b commit 79beade

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/CSharpLanguageServer.Tests/CSharpLanguageServer.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<Compile Include="DiagnoseCommandTests.fs" />
2626
<Compile Include="SignatureHelpTests.fs" />
2727
<Compile Include="TypeDefinitionTests.fs" />
28+
<Compile Include="ImplementationTests.fs" />
2829
</ItemGroup>
2930

3031
<ItemGroup>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module CSharpLanguageServer.Tests.ImplementationTests
2+
3+
open System
4+
5+
open NUnit.Framework
6+
open Ionide.LanguageServerProtocol.Types
7+
8+
open CSharpLanguageServer.Tests.Tooling
9+
10+
[<Test>]
11+
let ``test textDocument/implementation works`` () =
12+
use client = activateFixture "genericProject"
13+
use classFile = client.Open "Project/Class.cs"
14+
15+
let implementationParams0: ImplementationParams =
16+
{ TextDocument = { Uri = classFile.Uri }
17+
Position = { Line = 10u; Character = 8u }
18+
WorkDoneToken = None
19+
PartialResultToken = None }
20+
21+
let implementation0: U2<Definition, DefinitionLink array> option =
22+
client.Request("textDocument/implementation", implementationParams0)
23+
24+
// TODO: fix this test
25+
()

0 commit comments

Comments
 (0)