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)
C# NUnit Tests ConfigureTestServices is not injecting service overrides
I'm running into a very strange issue where service overrides are not getting performed in my unit tests. I'm currently on dotnet 5 and EF Core 5.
This is the code that is used to inject mock overrid...
Zak Thompson
Votes: 0
Answers: 1
NUnit3TestExecutor throwing an ArgumentNullException - Value cannot be null
I am using Azure DevOps for our CI/CD pipeline.
The Visual Studio Test task on the Agent Job has suddenly started failing.
The error in the logs is:
An exception occurred while invoking executor
'exe...
openshac
Votes: 0
Answers: 1
Getting System.NotSupportedException while mocking FirstOrDefaultAsync method in C# NUnit
I am trying to write Unit Tests for the method below:
public async Task<int> Method1(string agentId, long userId)
{
using var scope = _provider.CreateScope();
var class1Obj...
Lily
Votes: 0
Answers: 1
NUnit - how to test operation twice using custom setting each time
I would like to know how to test propertly via NUnit same operation.
Each call should set parameter to static property. I am looking for similiar TestCase implementation.
Usage:
[DesktopTest, MobileTe...
user1085907
Votes: 0
Answers: 1