79189304

Date: 2024-11-14 15:02:35
Score: 2
Natty:
Report link

The same, as @John Nyingi's answer, but just with async test method

 [Fact]
public async Task Test()
{
    Task createUserTask = service.CreateUser(user);
    await createUserTask; // there is no lock of the current thread here

    Assert.True(createUserTask.IsCompletedSuccessfully);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @John
  • Low reputation (1):
Posted by: VladimirK