Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture and report context in AssertEx.WaitUntil if the actionAsync throws #37

Open
michael-sterling opened this issue Nov 16, 2021 · 0 comments

Comments

@michael-sterling
Copy link
Contributor

Example test code:

using (AssertEx.Context(() => "baz"))
	await AssertEx.WaitUntil<object>(() => throw new Exception("Foo"));

Current output:

System.Exception : Foo
  at [stack trace]

Expected output consistent with the DoesNotThrow extension:

Expected:
	value

Context:
	timeoutSeconds = 30
	totalRetries = 11
	"baz" = "baz"

System.Exception: Foo
   at [stack trace]

(with as good of an "Expected" as we can get; perhaps inferred from CallerArgumentExpression or the parameter for any follow-up expressions?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant