Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittest for dotnet-bsp #1

Open
schinnerld opened this issue May 10, 2024 · 1 comment
Open

Unittest for dotnet-bsp #1

schinnerld opened this issue May 10, 2024 · 1 comment

Comments

@schinnerld
Copy link

Hi Alexej! I need to understand BSP and your (great) implementation of it. That is the reason why I am in the process of writing unittests for it. For a better debugging experience, client and server run in the same process space in unittests. Small changes to your code were necessary for that. I am using the named pipes implementation and need to pass the pipe name of from outside.
Single unittest looks like this then.

 [TestMethod]
 public async Task BuildInitialize_Compile_CSharp_Async()
 {
     var result = await _testClient?.BuildInitializeAsync()!;
     Assert.AreEqual("csharp", result.Capabilities.CompileProvider?.LanguageIds.FirstOrDefault());
 }

If you want it like this in your project, I will create a PR for it.

Thank you!
Best regards, Dietmar

@616b2f
Copy link
Owner

616b2f commented May 13, 2024

Hi Dietmar,

I would be happy to accept such an PR. I didn't manage to create tests yet due to lack of time, but they are definitely planned and needed.

I would prefer XUnit tests, but if you are not familiar with it I would also accept any other framework and would rewrite it when I implement the rest of the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants