{"id":27733666,"url":"https://github.com/irof/junit-case-runner","last_synced_at":"2025-06-12T15:34:16.203Z","repository":{"id":11186667,"uuid":"13565667","full_name":"irof/junit-case-runner","owner":"irof","description":null,"archived":false,"fork":false,"pushed_at":"2013-10-15T00:26:30.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T12:57:56.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irof.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-14T15:49:32.000Z","updated_at":"2013-10-15T00:26:33.000Z","dependencies_parsed_at":"2022-08-31T03:21:27.294Z","dependency_job_id":null,"html_url":"https://github.com/irof/junit-case-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/irof/junit-case-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irof%2Fjunit-case-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irof%2Fjunit-case-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irof%2Fjunit-case-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irof%2Fjunit-case-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irof","download_url":"https://codeload.github.com/irof/junit-case-runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irof%2Fjunit-case-runner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259493933,"owners_count":22866415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-28T12:55:04.440Z","updated_at":"2025-06-12T15:34:16.194Z","avatar_url":"https://github.com/irof.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# これはなに\n\nJUnitのアノテーションでパラメタライズドをアレするソレです。\n\n## sample\n\n    import net.hogedriven.junit.Case;\n    import net.hogedriven.junit.CaseRunner;\n    import net.hogedriven.junit.Tests;\n    import org.junit.Test;\n    import org.junit.runner.RunWith;\n\n    import static org.hamcrest.CoreMatchers.is;\n    import static org.junit.Assert.assertThat;\n\n    @RunWith(CaseRunner.class)\n    public class CaseRunnerTest {\n\n        @Test\n        @Case(\"someString\")\n        public void simpleTestCase(String param) {\n            assertThat(param, is(\"someString\"));\n        }\n\n        @Tests({\n                @Case({\"str1\", \"str1\"}),\n                @Case({\"str2\", \"str2\"}),\n                @Case({\"str3\", \"str3\"})\n        })\n        public void parameterTestsCase(String actual, String expected) {\n            assertThat(actual, is(expected));\n        }\n\n        @Test\n        @Case(\"123\")\n        public void intTest(int i) {\n            assertThat(i, is(123));\n        }\n\n        @Test\n        @Case({\"true\", \"1234567890123\", \"12.3\", \"12.34\", \"1\"})\n        public void primitives(boolean bool, long l, float f, double d, byte b) {\n            assertThat(bool, is(true));\n            assertThat(l, is(1234567890123L));\n            assertThat(f, is(12.3F));\n            assertThat(d, is(12.34D));\n            assertThat(b, is((byte) 1));\n        }\n    }\n\n## 使いかたとかのメモ\n\n* RunWith に CaseRunner を指定する。\n* @Test に続けて @Case で入れたいパラメータを入れる。\n* 複数指定したい場合（こっちがメイン）は @Tests を使う。\n* パラメータは全て String で書く。\n* 書いたパラメータはメソッド引数になる。とりあえずStringかプリミティブ。\n* Case に書いた個数とメソッド引数の個数が合ってなきゃコケる。\n* 別途 Parser を指定すれば好きな型が使える。けど未だ外から使えるようになってない。\n* Tests で Case を使用した場合のテストレポートのメソッド名は `メソッド名_[パラメータ]` になる。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firof%2Fjunit-case-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firof%2Fjunit-case-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firof%2Fjunit-case-runner/lists"}