{"action":"opened","issue":{"url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/issues/41","repository_url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager","labels_url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/issues/41/comments","events_url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/issues/41/events","html_url":"https://github.com/VaclavStebra/pa165-booking-manager/issues/41","id":191026234,"number":41,"title":"Tests for Hotel Facade and Service","user":{"login":"VaclavStebra","id":3999840,"avatar_url":"https://avatars.githubusercontent.com/u/3999840?v=3","gravatar_id":"","url":"https://api.github.com/users/VaclavStebra","html_url":"https://github.com/VaclavStebra","followers_url":"https://api.github.com/users/VaclavStebra/followers","following_url":"https://api.github.com/users/VaclavStebra/following{/other_user}","gists_url":"https://api.github.com/users/VaclavStebra/gists{/gist_id}","starred_url":"https://api.github.com/users/VaclavStebra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VaclavStebra/subscriptions","organizations_url":"https://api.github.com/users/VaclavStebra/orgs","repos_url":"https://api.github.com/users/VaclavStebra/repos","events_url":"https://api.github.com/users/VaclavStebra/events{/privacy}","received_events_url":"https://api.github.com/users/VaclavStebra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"hagaram","id":22323673,"avatar_url":"https://avatars.githubusercontent.com/u/22323673?v=3","gravatar_id":"","url":"https://api.github.com/users/hagaram","html_url":"https://github.com/hagaram","followers_url":"https://api.github.com/users/hagaram/followers","following_url":"https://api.github.com/users/hagaram/following{/other_user}","gists_url":"https://api.github.com/users/hagaram/gists{/gist_id}","starred_url":"https://api.github.com/users/hagaram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hagaram/subscriptions","organizations_url":"https://api.github.com/users/hagaram/orgs","repos_url":"https://api.github.com/users/hagaram/repos","events_url":"https://api.github.com/users/hagaram/events{/privacy}","received_events_url":"https://api.github.com/users/hagaram/received_events","type":"User","site_admin":false},"assignees":[{"login":"hagaram","id":22323673,"avatar_url":"https://avatars.githubusercontent.com/u/22323673?v=3","gravatar_id":"","url":"https://api.github.com/users/hagaram","html_url":"https://github.com/hagaram","followers_url":"https://api.github.com/users/hagaram/followers","following_url":"https://api.github.com/users/hagaram/following{/other_user}","gists_url":"https://api.github.com/users/hagaram/gists{/gist_id}","starred_url":"https://api.github.com/users/hagaram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hagaram/subscriptions","organizations_url":"https://api.github.com/users/hagaram/orgs","repos_url":"https://api.github.com/users/hagaram/repos","events_url":"https://api.github.com/users/hagaram/events{/privacy}","received_events_url":"https://api.github.com/users/hagaram/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/milestones/2","html_url":"https://github.com/VaclavStebra/pa165-booking-manager/milestones/2nd%20Milestone","labels_url":"https://api.github.com/repos/VaclavStebra/pa165-booking-manager/milestones/2/labels","id":2141714,"number":2,"title":"2nd Milestone","description":"\r\n    Implement Facade layer interfaces and implementations.\r\n        Everything that should happen in the system must be available through these interfaces (create entities, deleting them etc);\r\n        You must have at least 2 non-trivial business functions on Service Layer (the example project contains several of them). Service layer is not always just a place to delegate to DAO;\r\n    Other points about the Facade and Service layers:\r\n        All the classes must be wired via dependency injection. Your service objects should obtain an instance of the EntityManager that way;\r\n        All the facade interfaces must not reference entities, but Transfer Objects only;\r\n        All service interfaces must reference only entities, not Data Transfer Objects;\r\n        You can use Dozer framework to map entity instances to transfer objects. The mapping may be done on Facade Layer;\r\n        Facade layer is used to drive transactions;\r\n    Change layout of your project to Multimodule Maven project (tutorial here http://maven.apache.org/guides/getting-started/index.html) Your project should have 3 separate modules:\r\n        DAO layer\r\n        Service Layer and Facade Layer implementation\r\n        API layer - just DTOs and facade interfaces!\r\n    Facade layer will use Service layer and Service layer will use DAO layer;\r\n    Make sure that DataAccessException or its subclass is thrown in case of any exception on a the DAO layer;\r\n    Implement simple unit tests for facade layer. Just one simple test per method is enough. This is mainly so that it’s easy to verify the Facade layer works;\r\n    There must be extensive unit tests for the service layer (particularly for your 2 business functions) and all the tests of service layer must use Mock DAO objects;\r\n","creator":{"login":"VaclavStebra","id":3999840,"avatar_url":"https://avatars.githubusercontent.com/u/3999840?v=3","gravatar_id":"","url":"https://api.github.com/users/VaclavStebra","html_url":"https://github.com/VaclavStebra","followers_url":"https://api.github.com/users/VaclavStebra/followers","following_url":"https://api.github.com/users/VaclavStebra/following{/other_user}","gists_url":"https://api.github.com/users/VaclavStebra/gists{/gist_id}","starred_url":"https://api.github.com/users/VaclavStebra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VaclavStebra/subscriptions","organizations_url":"https://api.github.com/users/VaclavStebra/orgs","repos_url":"https://api.github.com/users/VaclavStebra/repos","events_url":"https://api.github.com/users/VaclavStebra/events{/privacy}","received_events_url":"https://api.github.com/users/VaclavStebra/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":4,"state":"open","created_at":"2016-11-17T12:26:41Z","updated_at":"2016-11-22T14:45:40Z","due_on":"2016-11-25T00:00:00Z","closed_at":null},"comments":0,"created_at":"2016-11-22T14:45:40Z","updated_at":"2016-11-22T14:45:40Z","closed_at":null,"body":""}}
{"actor":{"display_login":"VaclavStebra"}}