python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
HTTPClientFactory MOQ testing cancellationToken is true when running in normal, but when executing unit test case cancelation token is false
I am trying to make an PostAsync call using IHttpClientFactory , The cancellation token is working fine and exception is caught by CatchBlock.
But when trying to mock the method the Cancellation token...

Rupesh
Votes: 0
Answers: 1
How to prevent xUnit from logging when use it from `dotnet test`?
It should be simple, but I am not able to make it.
Setup
.NET 6 class library
xUnit 2.4.1 as a test framework
Everything is nice.
I am trying to execute all my unit tests before committing.
If any ...

Hakan Fıstık
Votes: 0
Answers: 1
The 'Collate' method is not supported because the query has switched to client-evaluation
I am new to .net 6.
I wanted to test with Xunit a method with an explicit collation in a LINQ query .
When I try to test this method , i have this error : "The 'Collate' method is not supported ...
Anderson Paolo
Votes: 0
Answers: 0
Use XUnit with UnitOfWork and Repository in .NET 6
I use UnitOfWork with repository in an ASP.NET Core 6 Web API and want to use XUnit for testing. I use the code shown below, and it works.
I have two questions:
I use accept-language in the methods t...
SajjadZare
Votes: 0
Answers: 0