[Not completed] CSharp language server - SkorikSergey/Language-servers-test-plan GitHub Wiki
Preconditions:
- Create workspace from the .NET stack with .NET project.
- Enable C# language server in the Installers tab and start the workspace.
Testing process
- Language server initialization
- From the project open "Program.cs" file.
- Check
Finished language servers initialization, file path '/dotnet-web-simple/Program.cs'message in the dev-machine console.
- Code validation feature, Comment line, Autocomplete feature
- Open "Program.cs" file.
- Make sure that code is validated by LS. We should have info markers in the 1-5 and 8,9 positions. Hover curso for instance on the first maker. Make sure that hint contains
Unnecessary using directive. - Remove
;from theBuild();- the error marker should appear. Undo changes the error marker should disappear. - Remove
Buildtill.symbol. Invoke autocomplete (Ctrl+Space). Make sure thatBuildis present in the widget. - Hover cursor on
Build. Make sure that docker window withBuilds an Microsoft.AspNetCore.Hosting.IWebHost which hosts a web application.has been opened. - Paste
Buildand completeBuild(); - Move cursor in line 1 position and comment this line by Ctrl+/ buttons.
- Check that text in line 3 was changed from
package mainto//package main. - Uncomment this line by Ctrl+/ buttons.
- Find definition feature
- Open "Startup.cs" file.
- Add new method in the body of
Startupclass:
public static String checkMessage(){
return "Message has been checked";
}
- Add instance of the
Startup.csclass intoProgram.csin next way: set cursor into the body of Main method of Program.cs and create invocation like:Startup.checkMessage(); - Set cursor on the
checkMessageand invoke go to the definition by F4 Make sure that Startup.cs file is opened and cursor has been placed to checkMessagemethod. - Set cursor to
Build();and invoke the go to the definition again. Make sure thatIWebHostBuilderhas been opened and cursor was set to the Build position (Clarify this usecase because this feature may be unavailable)
- Hover feature
- Open "Program.cs" file.
- Hover cursor on
Build. Make sure that hovering works without duplicated items. In the widget we should get next:IWebHost IWebHostBuilder.Build() Builds an Microsoft.AspNetCore.Hosting.IWebHost which hosts a web application.
Rename TODO
- Open "Program.cs" file.
- Select "" variable in line ****.
- Start Rename feature by Shift+F6 or from Assistant menu.
- Type new variable name.
- Check that the variable name was changed.
Signature Help TODO
- Open "Program.cs" file.
- Type `````` on line .
- Type '(' symbol and wait for hover popup with `````` text.
- Delete added line.
Go To Symbol TODO
- Open "Program.cs" file.
- Start Go To Symbol feature by Ctrl+F12 buttons or from Assistant menu.
- Wait for Go To Symbol form is opened with next lines:
- Click on any of them and check that it correctly selected in file.