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

when "Declare exceptions thrown by tested class" setting is on - test code exceptions should be taken into account #32

Closed
yaronyam opened this issue Apr 12, 2024 · 2 comments

Comments

@yaronyam
Copy link
Member

When Setting "Declare exceptions thrown by tested class" is set and no exception declared by tested method - still need to consider exceptions declared by test code methods
For instance, this Powermock SDK method - org.powermock.api.mockito.expectation.PowerMockitoStubber#when(T, java.lang.String, java.lang.Object...) - declares an exception

image

can be tested with com.weirddev.testme.intellij.generator.TestMeGeneratorJunit4PowerMockTest#testRenderInternalMethodCallStubs
we probably need to add some logic in Mock builder to decide if throws Exception should be declared even though tested method does not.

related to #29
FYI @zhangfj88

@zhangfj88
Copy link
Contributor

Thank you for raising the issue and suggestions regarding this feature. I will submit the revised code accordingly.

@yaronyam
Copy link
Member Author

yaronyam commented May 1, 2024

Fixed in #34. Released in V6.4.1 Thanks again for fixing this @zhangfj88

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

2 participants