{"id":232,"date":"2024-02-17T12:31:11","date_gmt":"2024-02-17T11:31:11","guid":{"rendered":"https:\/\/fixthebugs.com\/?p=232"},"modified":"2024-02-17T12:31:13","modified_gmt":"2024-02-17T11:31:13","slug":"junit-org-junit-jupiter-api-extension-parameterresolutionexception-no-parameterresolver-registered-for-parameter","status":"publish","type":"post","link":"https:\/\/fixthebugs.com\/index.php\/2024\/02\/17\/junit-org-junit-jupiter-api-extension-parameterresolutionexception-no-parameterresolver-registered-for-parameter\/","title":{"rendered":"JUnit: org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter"},"content":{"rendered":"\n<p><strong>Problem<\/strong>:  JUnit test returns next error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter<\/code><\/pre>\n\n\n\n<p><strong>Solution number one:<\/strong><\/p>\n\n\n\n<p>Maybe you are using <strong>@Test and @ParametizedTest or @Test and @RepeatedTest <\/strong>or something similar in the same method. Just <strong>remove @Test<\/strong> to fix this bug.<\/p>\n\n\n\n<p><strong>Solution number two:<\/strong><\/p>\n\n\n\n<p>Include <strong>@ExtendWith({OutputCaptureExtension.class, MockitoExtension.class})<\/strong> at class level if you are trying to capture logs outputs or something similar.<\/p>\n\n\n\n<p>For more interesting tutorials &amp; guides just check them&nbsp;<a rel=\"dofollow\" href=\"https:\/\/fixthebugs.com\/index.php\/category\/tutorials-guides\/\">HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter<\/p>\n","protected":false},"author":1,"featured_media":234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[9,11],"tags":[69,68,67,66,70],"_links":{"self":[{"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/posts\/232"}],"collection":[{"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":2,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/posts\/232\/revisions\/235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/media\/234"}],"wp:attachment":[{"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fixthebugs.com\/index.php\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}