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

Why are AssertExceptions thrown within Assembly/Class Initializations differentiated? #687

Closed
andrewphamvk opened this issue Feb 19, 2020 · 2 comments

Comments

@andrewphamvk
Copy link
Contributor

Description

When an AssemblyInitialize or ClassInitialize throws an Exception (in most cases), it is formatted like:

Assembly Initialization method {0}.{1} threw exception. {2}: {3}. Aborting test execution.

When an AssemblyInitialize or ClassInitialize fails with an Assert exception, the message is like:

Assert.IsTrue failed.

Ask

Is it possible to always format it like the former so that it is clear the initialization failed?

@andrewphamvk andrewphamvk changed the title Why are AssertExceptions thrown within Assembly/Class Initializations unwrapped? Why are AssertExceptions thrown within Assembly/Class Initializations differentiated? Feb 19, 2020
@jinweili1
Copy link

Are there any updates? I'm curious about this as well. And I would like to know how I could determine whether a test failed because assembly init or class init failed. I find all properties and fields in test results, but none of them works.

@Evangelink
Copy link
Member

Fixed by #1147

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

No branches or pull requests

3 participants