I'm a bit confused here. I'm using FluentAssertions and I have this test method:
[Test]
public void DoNothingWhenEmpty()
{
FileCleanUpProcessor fileProcessor = new();
Func<ValueTask> act = () => fileProcessor.ProcessCommands();
act.Should().NotThrow();
}
The MUT signature is the following:
public async ValueTask ProcessCommands() { ... }
While it works (I guess), I wonder if I've written this correctly. And why method NotThrowAsync() is not available/not implemented for ValueTask.
What am I missing?
Given that the subject under test is asynchronous then it stands to reason that the test should be async as well.
NotThrowAsync()was defined for eitherTaskorTask<TResult>and as such is not available forValueTaskReference FluentAssertions : Exceptions