Missing ThrowWithinAsync similar to CompleteWithinAsync
See original GitHub issueWe have already the assertion CompleteWithinAsync
for asynchonous operations. This is a check with timeout in addition to NotThrowAsync
.
Further we can assert ThrowAsync
when expecting exceptions. Now I’m often missing ThrowWithinAsync
when expecting exception and required timeout check.
In #1974 I already added proove-of-concept. What do you think?
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Releases - Fluent Assertions
Fixed hanging of CompleteWithinAsync when used with WithResult and AssertionScope - #2101; BeEquivalentTo no longer crashes on fields hiding base-class ...
Read more >Releases · fluentassertions/fluentassertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit...
Read more >Fluent Assertions: Fluently Assert the Result of .NET Tests
Typically, assertions in unit tests can be syntactically complex and not very expressive, which makes them hard to read and understand. Fluent ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Possibly, can I ask you to open a discussion about this instead?
Question/food for thought: would it be possible to model this “window of time” in a more orthogonal manner? One that didn’t force particular overloads for all the scenarios?
So, instead of
ThrowWithin
we had a variation likeThrow().Within(timespan)
? (or.Within(timespan).Throw()
, or any other variation).This “dimension” then could have different methods, such as
PS: I’m coming here from the latest release notes… I had no idea this was open for such a long time.
Also, I assume this issue should’ve been closed already?