Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
96 views

In a C# project within VSCode with xUnit tests, Test Explorer in the dev container offers you a Run and a Debug option. Where do you configure the details of these, or at least find a full description ...
0 votes
0 answers
111 views

I'm trying to add tests to my MAUI app. I added the xUnit test project to a separate namespace. The tests only run in the terminal with the dotnet test command. If I use the test explorer, it doesn't ...
2 votes
2 answers
106 views

I have the following project structure (the full repo can be found at https://github.com/asarkar/functional-csharp-buonanno) that uses Microsoft Testing Platform + xUnit v3 for testing. root ├── src │ ...
0 votes
0 answers
35 views

I have an ASP.NET Core 9 Web API project and in the Azure DevOps pipeline, there are compiled files being collected for coverage - and there is no test code for those. For example the Mediator Library....
3 votes
1 answer
92 views

The code to be tested is as follows: //pseudo code public class ConnectionManager: IConnectionManager ( ILogService _logService; IConnector _iConnector; public ConnectionManager(...
Nitin S's user avatar
  • 7,711
1 vote
1 answer
91 views

I'm writing a unit test for a method that should catch UnauthorizedAccessException and return a special enum result. However, the test fails - the method returns Success instead of UnauthorizedAccess. ...
2 votes
1 answer
39 views

I have multiple lines which are mocking the method: _mockClass.Setup(d => d.TestAsync(It.IsAny<string>(), It.IsAny<long>())) .ReturnsAsync(1); I want to make shorthand for the ...
Nitin S's user avatar
  • 7,711
0 votes
1 answer
103 views

I have multiple ICollectionFixture<WebApplicationFactory> and use the WebApplicationFactory::InitializeAsync to initialize the database. However, I run into duplicate PK issue. I use xUnit with ...
0 votes
0 answers
69 views

HttpClient.PostAync does not reach controller endpoint at all. GetAsync and DeleteAsync are OK. Program.cs: builder.Services.AddControllersWithViews(); app.MapControllers(); Controller: [Route("...
2 votes
1 answer
480 views

We want to upgrade to xUnit v3. All seems to go well locally, but on our build server we don't want to run all the tests. The old action command-line is dotnet test --filter "(FullyQualifiedName!~...
2 votes
0 answers
247 views

I'm encountering an issue with my integration tests that use TestContainers and Respawn. The tests work perfectly in Debug mode (and within seconds) but fail in Release mode with the following timeout ...
Doidel's user avatar
  • 339
1 vote
1 answer
161 views

I am working within a multiproject repository and would like to specify project specific Unit tests. I have come across some resources which noted that it is possible to create a custom TraitAttribute....
bengs's user avatar
  • 91
2 votes
1 answer
580 views

I am having problems trying to do unit testing/integration with .NET 8 to a project (small api that works), I wanted to add tests to it to learn since I had never done them but I am running into ...
0 votes
0 answers
55 views

I'm using a template method for tests with an abstract base class. The abstract class is just a template with code that will be used in each derived class, and when some part of the code differs, I ...
1 vote
2 answers
141 views

I have a ‘Project’ project in C# .Net 8.0 in which I use an external .dll library (a wrapper coded by ourselves that we'll call ‘wrapper.dll’). I'm setting up a ‘Project.Tests’ test project with xUnit,...

15 30 50 per page
1
2 3 4 5
...
70

AltStyle によって変換されたページ (->オリジナル) /