{"action":"created","issue":{"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/245","repository_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/245/comments","events_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/245/events","html_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/245","id":178865290,"number":245,"title":"RESTWS-623 Make RestServiceImpl.getResourceByName testable","user":{"login":"teleivo","id":4661144,"avatar_url":"https://avatars.githubusercontent.com/u/4661144?v=3","gravatar_id":"","url":"https://api.github.com/users/teleivo","html_url":"https://github.com/teleivo","followers_url":"https://api.github.com/users/teleivo/followers","following_url":"https://api.github.com/users/teleivo/following{/other_user}","gists_url":"https://api.github.com/users/teleivo/gists{/gist_id}","starred_url":"https://api.github.com/users/teleivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teleivo/subscriptions","organizations_url":"https://api.github.com/users/teleivo/orgs","repos_url":"https://api.github.com/users/teleivo/repos","events_url":"https://api.github.com/users/teleivo/events{/privacy}","received_events_url":"https://api.github.com/users/teleivo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-23T12:34:11Z","updated_at":"2016-09-23T12:39:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/pulls/245","html_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/245","diff_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/245.diff","patch_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/245.patch"},"body":"* add dependency for OpenmrsClassScanner to RestServiceImpl and inject via xml\r\nusing the factory method on OpenmrsClassScanner.getInstance() which returns the\r\nsingleton instance\r\n* add first tests for getResourceByName by mocking the\r\nOpenmrsClassScanner.getClasses\r\n\r\nsee https://issues.openmrs.org/browse/RESTWS-623"},"comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/comments/249181063","html_url":"https://github.com/openmrs/openmrs-module-webservices.rest/pull/245#issuecomment-249181063","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-webservices.rest/issues/245","id":249181063,"user":{"login":"teleivo","id":4661144,"avatar_url":"https://avatars.githubusercontent.com/u/4661144?v=3","gravatar_id":"","url":"https://api.github.com/users/teleivo","html_url":"https://github.com/teleivo","followers_url":"https://api.github.com/users/teleivo/followers","following_url":"https://api.github.com/users/teleivo/following{/other_user}","gists_url":"https://api.github.com/users/teleivo/gists{/gist_id}","starred_url":"https://api.github.com/users/teleivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teleivo/subscriptions","organizations_url":"https://api.github.com/users/teleivo/orgs","repos_url":"https://api.github.com/users/teleivo/repos","events_url":"https://api.github.com/users/teleivo/events{/privacy}","received_events_url":"https://api.github.com/users/teleivo/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T12:39:15Z","updated_at":"2016-09-23T12:39:15Z","body":"@rkorytkowski hope you can review this PR and tell me if the approach is sound.\r\n\r\nsome notes:\r\nwebModuleApplicationContext.xml seems to change totally in the diff. but I only added the \r\n\r\n```xml\r\n\t<bean id=\"openmrsClassScanner\"\r\n \t\t  class=\"org.openmrs.module.webservices.rest.web.OpenmrsClassScanner\"\r\n \t\tfactory-method=\"getInstance\" >\r\n \t</bean>\r\n```\r\n\r\nand injected it into the added RestServiceImpl property.\r\n\r\nAnother thing I could use your help is:\r\n\r\nin the RestServiceImplTest I added a fake `MockingBirdFantasyResource` so I can test (otherwise I need to add a dependency to another maven module which has Resources)\r\n\r\nthe issue I am having is that the the one test which returns the resource works only if the openmrs version is equal to the current one. I hard coded \"1.9.10\" since I cannot use the static `OpenmrsConstants.OPENMRS_VERSION_SHORT` maybe you have an idea for me on how to handle this :)\r\n\r\nother than that hope we are going in the right direction :tropical_drink: "}}
{"actor":{"display_login":"teleivo"}}