I had a need to ensure a method took a certain amount of time which I know is a pretty unusual use case but here's the code if you want to include it in the framework. It also supports fluent chaining which is lacking in the other action assertions and I can see why as it makes it difficult to know when to invoke the action.
We have improved this area for the upcoming 5.0.0 in #653 and added
BeCloseTo(TimeSpan expectedDuration, TimeSpan precision, string because = "", params object[] becauseArgs)
Here are two extracts from the tests of what this enables you to assert.
subject.ExecutionTimeOf(s => s.Sleep(510)).Should().BeCloseTo(500.Milliseconds(), 50.Milliseconds());
someAction.ExecutionTime().Should().BeCloseTo(500.Milliseconds(), 50.Milliseconds());
@carlin-q-scott is that what you meant?
@sw-carlin seems you switched to a new GitHub profile?
I use both profiles but I'm on my personal one way less frequently. Yes, the 5.0 release addressed my ask.
Most helpful comment
We have improved this area for the upcoming 5.0.0 in #653 and added
Here are two extracts from the tests of what this enables you to assert.