{"action":"created","issue":{"url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/16","labels_url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/16/comments","events_url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/16/events","html_url":"https://github.com/pushtorefresh/java-private-constructor-checker/issues/16","id":122379056,"number":16,"title":"Private Constructor with parameter","user":{"login":"vanniktech","id":5759366,"avatar_url":"https://avatars.githubusercontent.com/u/5759366?v=3","gravatar_id":"","url":"https://api.github.com/users/vanniktech","html_url":"https://github.com/vanniktech","followers_url":"https://api.github.com/users/vanniktech/followers","following_url":"https://api.github.com/users/vanniktech/following{/other_user}","gists_url":"https://api.github.com/users/vanniktech/gists{/gist_id}","starred_url":"https://api.github.com/users/vanniktech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanniktech/subscriptions","organizations_url":"https://api.github.com/users/vanniktech/orgs","repos_url":"https://api.github.com/users/vanniktech/repos","events_url":"https://api.github.com/users/vanniktech/events{/privacy}","received_events_url":"https://api.github.com/users/vanniktech/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"artem-zinnatullin","id":967132,"avatar_url":"https://avatars.githubusercontent.com/u/967132?v=3","gravatar_id":"","url":"https://api.github.com/users/artem-zinnatullin","html_url":"https://github.com/artem-zinnatullin","followers_url":"https://api.github.com/users/artem-zinnatullin/followers","following_url":"https://api.github.com/users/artem-zinnatullin/following{/other_user}","gists_url":"https://api.github.com/users/artem-zinnatullin/gists{/gist_id}","starred_url":"https://api.github.com/users/artem-zinnatullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artem-zinnatullin/subscriptions","organizations_url":"https://api.github.com/users/artem-zinnatullin/orgs","repos_url":"https://api.github.com/users/artem-zinnatullin/repos","events_url":"https://api.github.com/users/artem-zinnatullin/events{/privacy}","received_events_url":"https://api.github.com/users/artem-zinnatullin/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-12-15T22:12:10Z","updated_at":"2015-12-16T11:09:59Z","closed_at":null,"body":"I want to test a class that it has only exactly one constructor which is private and takes one argument. \r\n\r\nI thought\r\n\r\n```java\r\nPrivateConstructorChecker.forClass(MyClass.class).check();\r\n```\r\n\r\nwould do it but it gave me an exception back:\r\n\r\n> java.lang.AssertionError: class onactivityresult.compiler.Parameter has non-default constructor with some parameters\r\n\r\nSo I guess this was a design decision. Would you be open for a new API to test the described behavior?\r\n\r\nMaybe something alone the lines of\r\n\r\n```java\r\nPrivateConstructorChecker.forClass(MyClass.class).expectWithParameters(...).check();\r\n```\r\n\r\nObviously `expectWithParameters` would return a different builder so you're not able to call `expectedExceptionMessage` and `expectedTypeOfException` on it.\r\n\r\nFor the case of multiple constructors we could do `expectMultipleWithParameters(`."},"comment":{"url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/comments/165068943","html_url":"https://github.com/pushtorefresh/java-private-constructor-checker/issues/16#issuecomment-165068943","issue_url":"https://api.github.com/repos/pushtorefresh/java-private-constructor-checker/issues/16","id":165068943,"user":{"login":"vanniktech","id":5759366,"avatar_url":"https://avatars.githubusercontent.com/u/5759366?v=3","gravatar_id":"","url":"https://api.github.com/users/vanniktech","html_url":"https://github.com/vanniktech","followers_url":"https://api.github.com/users/vanniktech/followers","following_url":"https://api.github.com/users/vanniktech/following{/other_user}","gists_url":"https://api.github.com/users/vanniktech/gists{/gist_id}","starred_url":"https://api.github.com/users/vanniktech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanniktech/subscriptions","organizations_url":"https://api.github.com/users/vanniktech/orgs","repos_url":"https://api.github.com/users/vanniktech/repos","events_url":"https://api.github.com/users/vanniktech/events{/privacy}","received_events_url":"https://api.github.com/users/vanniktech/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T11:09:58Z","updated_at":"2015-12-16T11:09:58Z","body":"Happy birthday @artem-zinnatullin :cake: :beer: \r\n\r\n@nikitin-da are you suggesting a new class for that or do you wanna use the same one `PrivateConstructorChecker`?"}}