question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing ThrowWithinAsync similar to CompleteWithinAsync

See original GitHub issue

We 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:closed
  • Created 10 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jnyrupcommented, Apr 20, 2023

Question/food for thought: would it be possible to model this “window of time” in a more orthogonal manner?

Possibly, can I ask you to open a discussion about this instead?

0reactions
julealgoncommented, Apr 20, 2023

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 like Throw().Within(timespan)? (or .Within(timespan).Throw(), or any other variation).

This “dimension” then could have different methods, such as

  • Within
  • After

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found