{"action":"created","issue":{"url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/1","labels_url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/1/comments","events_url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/1/events","html_url":"https://github.com/NovaTecConsulting/BeanTest/issues/1","id":30376321,"number":1,"title":"JUnit Runner API ","user":{"login":"qabbasi","id":3501767,"avatar_url":"https://avatars.githubusercontent.com/u/3501767?v=3","gravatar_id":"","url":"https://api.github.com/users/qabbasi","html_url":"https://github.com/qabbasi","followers_url":"https://api.github.com/users/qabbasi/followers","following_url":"https://api.github.com/users/qabbasi/following{/other_user}","gists_url":"https://api.github.com/users/qabbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/qabbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qabbasi/subscriptions","organizations_url":"https://api.github.com/users/qabbasi/orgs","repos_url":"https://api.github.com/users/qabbasi/repos","events_url":"https://api.github.com/users/qabbasi/events{/privacy}","received_events_url":"https://api.github.com/users/qabbasi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"qabbasi","id":3501767,"avatar_url":"https://avatars.githubusercontent.com/u/3501767?v=3","gravatar_id":"","url":"https://api.github.com/users/qabbasi","html_url":"https://github.com/qabbasi","followers_url":"https://api.github.com/users/qabbasi/followers","following_url":"https://api.github.com/users/qabbasi/following{/other_user}","gists_url":"https://api.github.com/users/qabbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/qabbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qabbasi/subscriptions","organizations_url":"https://api.github.com/users/qabbasi/orgs","repos_url":"https://api.github.com/users/qabbasi/repos","events_url":"https://api.github.com/users/qabbasi/events{/privacy}","received_events_url":"https://api.github.com/users/qabbasi/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2014-03-28T10:27:59Z","updated_at":"2015-01-20T10:20:50Z","closed_at":null,"body":"Features:\r\n\r\n- More convenient option for using DI in the test: the User should be able to use directly @Inject in the corresponding Unit Tests e.g: \r\n\r\n  @RunWith(BeanTestingRunner.class)\r\n  class ServiceTest{\r\n  @Inject Service service;\r\n  }\r\n\r\n- The possibility to run the tests in a given transaction by the Runner. (as its already provided with the AbstractBeanProvider) The user just provide as normal a configuration for the persistence unit (persistence.xml).\r\n\r\n- A facility for the user to provide additional classes which may be not found by the underlying Weld Se Container e.g:\r\n\r\n @ClassesWhichEverWereNotFound(Service.class, Service1.class)\r\n\r\n- The user should also be able to provide CDI Alternatives. That means the user intentionally creates CDI Alternatives for the Unit Tests and provide these implementations to the underlying Weld Se Container."},"comment":{"url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/comments/70632596","html_url":"https://github.com/NovaTecConsulting/BeanTest/issues/1#issuecomment-70632596","issue_url":"https://api.github.com/repos/NovaTecConsulting/BeanTest/issues/1","id":70632596,"user":{"login":"carlosbarragan","id":6223938,"avatar_url":"https://avatars.githubusercontent.com/u/6223938?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosbarragan","html_url":"https://github.com/carlosbarragan","followers_url":"https://api.github.com/users/carlosbarragan/followers","following_url":"https://api.github.com/users/carlosbarragan/following{/other_user}","gists_url":"https://api.github.com/users/carlosbarragan/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosbarragan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosbarragan/subscriptions","organizations_url":"https://api.github.com/users/carlosbarragan/orgs","repos_url":"https://api.github.com/users/carlosbarragan/repos","events_url":"https://api.github.com/users/carlosbarragan/events{/privacy}","received_events_url":"https://api.github.com/users/carlosbarragan/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T10:20:50Z","updated_at":"2015-01-20T10:20:50Z","body":"I'm not sure that providing a facility to tests transactions is a good idea. IMHO if you need to test transaction behavior, you should refactor your code. BeanTest tries to hide the whole transaction propagation, so the user can concentrate on testing business logic inside an application module. \r\n\r\nI also think this feature could be complicated to implement because we have to somehow expose the local transaction through UserTransaction.  On the other hand, some time in the future we will probably have to provide access to the UserTransaction *inside* an EJB. \r\n\r\n@qabbasi the injection of UserTransaction doesn't work because there is no Producer for it. "}}