Title: Test generation for an abstract class fails · Issue #873 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Test generation for an abstract class fails · Issue #873 · UnitTestBot/UTBotJava
X Title: Test generation for an abstract class fails · Issue #873 · UnitTestBot/UTBotJava
Description: Description If we run test generation for an abstract class, the dialog appears, but further test generation fails. To Reproduce Steps to reproduce the behavior: Create a Java project Paste this code: abstract public class AbstractClass ...
Open Graph Description: Description If we run test generation for an abstract class, the dialog appears, but further test generation fails. To Reproduce Steps to reproduce the behavior: Create a Java project Paste this co...
X Description: Description If we run test generation for an abstract class, the dialog appears, but further test generation fails. To Reproduce Steps to reproduce the behavior: Create a Java project Paste this co...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/873
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test generation for an abstract class fails","articleBody":"**Description**\r\n\r\nIf we run test generation for an abstract class, the dialog appears, but further test generation fails.\r\n\r\n**To Reproduce**\r\n\r\nSteps to reproduce the behavior:\r\n\r\n1. Create a Java project\r\n2. Paste this code:\r\n```java\r\nabstract public class AbstractClass {\r\n int testMe(int x) {\r\n if (x == 0) {\r\n throw new IllegalStateException(\"123\");\r\n }\r\n return 0;\r\n }\r\n}\r\n```\r\n3. Run \"Create Tests with UtBot\" action\r\n4. Doesn't matter mocks enabled or not\r\n5. Choose the single method and press \"Generate Tests\" button\r\n\r\n**Expected behavior**\r\n\r\nI see these possible behaviors:\r\n- Prohibit to generate tests for abstract classes completely, so action is disabled, if the caret context class is abstract\r\n- Prohibit to generate tests for abstract classes completely, so popup appears if the user tries to run the action for an abstract class\r\n- Allow to generate tests for abstract classes if mocks are enabled, and initialize an abstract class instance with mocks\r\n\r\nMaybe there are better solutions.\r\n\r\n**Actual behavior**\r\n\r\nAn error popup appears saying nothing about the class is abstract.\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\n","author":{"url":"https://github.com/sergeypospelov","@type":"Person","name":"sergeypospelov"},"datePublished":"2022-09-08T06:55:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/873/UTBotJava/issues/873"}
| 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:2f4908ca-65be-bba5-6a84-2a0d18799c30 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B644:56975:1EFF7F:27AD24:698EA443 |
| html-safe-nonce | 3fc1039fe1c167b945653a5f888e8648cd26ec1992be85480734e5b6025f9d7a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjQ0OjU2OTc1OjFFRkY3RjoyN0FEMjQ6Njk4RUE0NDMiLCJ2aXNpdG9yX2lkIjoiODYxNTMxMTczNDQ1Njg4NjMzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dee27d4061c81c758428730793cc25987e895d882ed3283aa9d46338f0ccdc0b |
| hovercard-subject-tag | issue:1365641850 |
| 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/873/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ace62e27ae0c78dabc5d30b92d4ae8038813cce105799c12560cf00f875ff46/UnitTestBot/UTBotJava/issues/873 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ace62e27ae0c78dabc5d30b92d4ae8038813cce105799c12560cf00f875ff46/UnitTestBot/UTBotJava/issues/873 |
| og:image:alt | Description If we run test generation for an abstract class, the dialog appears, but further test generation fails. To Reproduce Steps to reproduce the behavior: Create a Java project Paste this co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sergeypospelov |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| 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 | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width