Title: Minimize exceptions in test methods signature · Issue #344 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Minimize exceptions in test methods signature · Issue #344 · UnitTestBot/UTBotJava
X Title: Minimize exceptions in test methods signature · Issue #344 · UnitTestBot/UTBotJava
Description: Description The generated tests code looks as follows: public void testSetImage2() throws Throwable, Exception { ... } Throwing both Exception and Throwable is odd. Can be reproduced with ContestEstimator on PDVisibleSignDesigner , metho...
Open Graph Description: Description The generated tests code looks as follows: public void testSetImage2() throws Throwable, Exception { ... } Throwing both Exception and Throwable is odd. Can be reproduced with ContestEs...
X Description: Description The generated tests code looks as follows: public void testSetImage2() throws Throwable, Exception { ... } Throwing both Exception and Throwable is odd. Can be reproduced with ContestEs...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/344
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Minimize exceptions in test methods signature","articleBody":"**Description**\r\n\r\nThe generated tests code looks as follows:\r\n\r\n```java\r\n public void testSetImage2() throws Throwable, Exception { ... }\r\n```\r\n\r\nThrowing both `Exception` and `Throwable` is odd. \r\nCan be reproduced with `ContestEstimator` on `PDVisibleSignDesigner` , method `setImage`\r\n\r\n**Expected behavior**\r\n\r\nThe signature looks like\r\n\r\n1) if Throwable is really required\r\n\r\n```java\r\n public void testSetImage2() throws Throwable { ... } \r\n```\r\n\r\n2) if throwable is really not required\r\n\r\n```java\r\n public void testSetImage2() throws Exception { ... }\r\n```\r\n\r\n**Context**\r\n\r\nPossibly the reason of this problem is in \r\n\r\n```kotlin\r\n//If [InvocationTargetException] is thrown manually in test, we \r\n// to add \"throws Throwable\" and other exceptions are not required so on.\r\nif (methodId == getTargetException) {\r\n collectedExceptions.clear()\r\n addException(Throwable::class.id)\r\n return\r\n}\r\n```\r\n","author":{"url":"https://github.com/EgorkaKulikov","@type":"Person","name":"EgorkaKulikov"},"datePublished":"2022-06-29T11:02:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/344/UTBotJava/issues/344"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e69c82cb-309d-9934-20da-10915351c28a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6EA:3F2860:194A979:22EDC08:698DBD32 |
| html-safe-nonce | ef39eb096f3d0d6094a635a1ed69077a3f12b6015ed47dd3efac0ab5ed6203f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkVBOjNGMjg2MDoxOTRBOTc5OjIyRURDMDg6Njk4REJEMzIiLCJ2aXNpdG9yX2lkIjoiNTAyNDYxMzIyOTgyNjc4NDU2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8516c8795abd1128bf32446d9cf7d70c77df1bc8776d8991a7baf86642313078 |
| hovercard-subject-tag | issue:1288541641 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UnitTestBot/UTBotJava/344/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3aa98bcc8bda6fa0dbebf7bad3536efdf5c6ccb2ee94ef0e311721c35d2c6ea/UnitTestBot/UTBotJava/issues/344 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3aa98bcc8bda6fa0dbebf7bad3536efdf5c6ccb2ee94ef0e311721c35d2c6ea/UnitTestBot/UTBotJava/issues/344 |
| og:image:alt | Description The generated tests code looks as follows: public void testSetImage2() throws Throwable, Exception { ... } Throwing both Exception and Throwable is odd. Can be reproduced with ContestEs... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EgorkaKulikov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 878672b82363fd98fbdc5bd0edb68e572c8a8d9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width