{"action":"created","issue":{"url":"https://api.github.com/repos/tipsy/javalin/issues/335","repository_url":"https://api.github.com/repos/tipsy/javalin","labels_url":"https://api.github.com/repos/tipsy/javalin/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/tipsy/javalin/issues/335/comments","events_url":"https://api.github.com/repos/tipsy/javalin/issues/335/events","html_url":"https://github.com/tipsy/javalin/issues/335","id":352711626,"node_id":"MDU6SXNzdWUzNTI3MTE2MjY=","number":335,"title":"Enable Mockito Tests: An Interface for Context","user":{"login":"grote","id":244947,"node_id":"MDQ6VXNlcjI0NDk0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/244947?v=4","gravatar_id":"","url":"https://api.github.com/users/grote","html_url":"https://github.com/grote","followers_url":"https://api.github.com/users/grote/followers","following_url":"https://api.github.com/users/grote/following{/other_user}","gists_url":"https://api.github.com/users/grote/gists{/gist_id}","starred_url":"https://api.github.com/users/grote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grote/subscriptions","organizations_url":"https://api.github.com/users/grote/orgs","repos_url":"https://api.github.com/users/grote/repos","events_url":"https://api.github.com/users/grote/events{/privacy}","received_events_url":"https://api.github.com/users/grote/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-21T21:10:42Z","updated_at":"2018-08-23T14:35:08Z","closed_at":null,"author_association":"NONE","body":"If `Context` would be an interface instead of a class, it could easily be mocked in unit tests.\r\n\r\nMy router delegates certain paths to controllers that have methods which only take a `Context` object. If this would be an interface, I could mock it and only unit test my controller in isolation.\r\n\r\nAll the test examples I have found in this repository use full integration test that I would like to avoid (at least for my controller unit tests)."},"comment":{"url":"https://api.github.com/repos/tipsy/javalin/issues/comments/415440745","html_url":"https://github.com/tipsy/javalin/issues/335#issuecomment-415440745","issue_url":"https://api.github.com/repos/tipsy/javalin/issues/335","id":415440745,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQ0MDc0NQ==","user":{"login":"tipsy","id":1521451,"node_id":"MDQ6VXNlcjE1MjE0NTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1521451?v=4","gravatar_id":"","url":"https://api.github.com/users/tipsy","html_url":"https://github.com/tipsy","followers_url":"https://api.github.com/users/tipsy/followers","following_url":"https://api.github.com/users/tipsy/following{/other_user}","gists_url":"https://api.github.com/users/tipsy/gists{/gist_id}","starred_url":"https://api.github.com/users/tipsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tipsy/subscriptions","organizations_url":"https://api.github.com/users/tipsy/orgs","repos_url":"https://api.github.com/users/tipsy/repos","events_url":"https://api.github.com/users/tipsy/events{/privacy}","received_events_url":"https://api.github.com/users/tipsy/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T14:35:08Z","updated_at":"2018-08-23T14:35:08Z","author_association":"OWNER","body":"Hi @guFalcon, sorry for making your life harder! \r\n\r\nIs adding Kotlin and mocck as test dependenies not an option? It seems simpler than dealing with mockito.\r\n\r\nI don't mind making `Context` non-final. \r\n\r\nPath-params are created by comparing the request-uri to the path from the route declaration, It happens in the `HandlerEntry` class."}}
{"actor":{"display_login":"tipsy"}}