{"action":"opened","number":117,"pull_request":{"url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117","id":81441758,"html_url":"https://github.com/springtestdbunit/spring-test-dbunit/pull/117","diff_url":"https://github.com/springtestdbunit/spring-test-dbunit/pull/117.diff","patch_url":"https://github.com/springtestdbunit/spring-test-dbunit/pull/117.patch","issue_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/117","number":117,"state":"open","locked":false,"title":"Allow database assertion to be defined as a bean","user":{"login":"mikebl71","id":1696712,"avatar_url":"https://avatars.githubusercontent.com/u/1696712?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebl71","html_url":"https://github.com/mikebl71","followers_url":"https://api.github.com/users/mikebl71/followers","following_url":"https://api.github.com/users/mikebl71/following{/other_user}","gists_url":"https://api.github.com/users/mikebl71/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebl71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebl71/subscriptions","organizations_url":"https://api.github.com/users/mikebl71/orgs","repos_url":"https://api.github.com/users/mikebl71/repos","events_url":"https://api.github.com/users/mikebl71/events{/privacy}","received_events_url":"https://api.github.com/users/mikebl71/received_events","type":"User","site_admin":false},"body":"Problem to solve:\r\nI would like to implement a custom logic for validating actual vs expected datasets.\r\nSpring-dbunit uses DatabaseAssertion objects for such validations.\r\nHowever, at present, the ExpectedDatabase annotation only accepts DatabaseAssertionMode. But DatabaseAssertionMode is an enum, which means that I cannot extend it in my project.\r\n\r\nProposed solution:\r\nSimilar to how you have \"dataSetLoader\" and \"dataSetLoaderBean\" elements in DbUnitConfiguration, I've added an \"assertionBean\" element to ExpectedDatabase. So now I can define any database assertion I like as a bean and refer to it in the annotation.\r\n\r\nExample:\r\n-----------------------------------\r\n    @Bean\r\n    public DatabaseAssertion dbAssertion() {\r\n        return new CustomDatabaseAssertion();\r\n    }\r\n-----------------------------------\r\n    @Test\r\n    @ExpectedDatabase(value = \"classpath:/datasets/Expected.xml\",\r\n            assertionBean = \"dbAssertion\")\r\n    public void test() throws Exception {\r\n        ....\r\n-----------------------------------\r\n","created_at":"2016-08-16T09:38:43Z","updated_at":"2016-08-16T09:38:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117/commits","review_comments_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117/comments","review_comment_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/117/comments","statuses_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/statuses/340b311d9924c2485a5930e99b8edccb0ee7ffd2","head":{"label":"mikebl71:master","ref":"master","sha":"340b311d9924c2485a5930e99b8edccb0ee7ffd2","user":{"login":"mikebl71","id":1696712,"avatar_url":"https://avatars.githubusercontent.com/u/1696712?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebl71","html_url":"https://github.com/mikebl71","followers_url":"https://api.github.com/users/mikebl71/followers","following_url":"https://api.github.com/users/mikebl71/following{/other_user}","gists_url":"https://api.github.com/users/mikebl71/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebl71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebl71/subscriptions","organizations_url":"https://api.github.com/users/mikebl71/orgs","repos_url":"https://api.github.com/users/mikebl71/repos","events_url":"https://api.github.com/users/mikebl71/events{/privacy}","received_events_url":"https://api.github.com/users/mikebl71/received_events","type":"User","site_admin":false},"repo":{"id":65460204,"name":"spring-test-dbunit","full_name":"mikebl71/spring-test-dbunit","owner":{"login":"mikebl71","id":1696712,"avatar_url":"https://avatars.githubusercontent.com/u/1696712?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebl71","html_url":"https://github.com/mikebl71","followers_url":"https://api.github.com/users/mikebl71/followers","following_url":"https://api.github.com/users/mikebl71/following{/other_user}","gists_url":"https://api.github.com/users/mikebl71/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebl71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebl71/subscriptions","organizations_url":"https://api.github.com/users/mikebl71/orgs","repos_url":"https://api.github.com/users/mikebl71/repos","events_url":"https://api.github.com/users/mikebl71/events{/privacy}","received_events_url":"https://api.github.com/users/mikebl71/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikebl71/spring-test-dbunit","description":"Integration between the Spring testing framework and DBUnit","fork":true,"url":"https://api.github.com/repos/mikebl71/spring-test-dbunit","forks_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/forks","keys_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/teams","hooks_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/hooks","issue_events_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/issues/events{/number}","events_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/events","assignees_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/assignees{/user}","branches_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/branches{/branch}","tags_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/tags","blobs_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/statuses/{sha}","languages_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/languages","stargazers_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/stargazers","contributors_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/contributors","subscribers_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/subscribers","subscription_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/subscription","commits_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/contents/{+path}","compare_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/merges","archive_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/downloads","issues_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/issues{/number}","pulls_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/pulls{/number}","milestones_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/milestones{/number}","notifications_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/labels{/name}","releases_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/releases{/id}","deployments_url":"https://api.github.com/repos/mikebl71/spring-test-dbunit/deployments","created_at":"2016-08-11T10:15:34Z","updated_at":"2016-08-11T10:15:35Z","pushed_at":"2016-08-16T09:22:48Z","git_url":"git://github.com/mikebl71/spring-test-dbunit.git","ssh_url":"git@github.com:mikebl71/spring-test-dbunit.git","clone_url":"https://github.com/mikebl71/spring-test-dbunit.git","svn_url":"https://github.com/mikebl71/spring-test-dbunit","homepage":"http://springtestdbunit.github.com/spring-test-dbunit/","size":3451,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"springtestdbunit:master","ref":"master","sha":"f5f48a141c761725cf13fecf45d21f5a30557484","user":{"login":"springtestdbunit","id":1524739,"avatar_url":"https://avatars.githubusercontent.com/u/1524739?v=3","gravatar_id":"","url":"https://api.github.com/users/springtestdbunit","html_url":"https://github.com/springtestdbunit","followers_url":"https://api.github.com/users/springtestdbunit/followers","following_url":"https://api.github.com/users/springtestdbunit/following{/other_user}","gists_url":"https://api.github.com/users/springtestdbunit/gists{/gist_id}","starred_url":"https://api.github.com/users/springtestdbunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/springtestdbunit/subscriptions","organizations_url":"https://api.github.com/users/springtestdbunit/orgs","repos_url":"https://api.github.com/users/springtestdbunit/repos","events_url":"https://api.github.com/users/springtestdbunit/events{/privacy}","received_events_url":"https://api.github.com/users/springtestdbunit/received_events","type":"Organization","site_admin":false},"repo":{"id":1161647,"name":"spring-test-dbunit","full_name":"springtestdbunit/spring-test-dbunit","owner":{"login":"springtestdbunit","id":1524739,"avatar_url":"https://avatars.githubusercontent.com/u/1524739?v=3","gravatar_id":"","url":"https://api.github.com/users/springtestdbunit","html_url":"https://github.com/springtestdbunit","followers_url":"https://api.github.com/users/springtestdbunit/followers","following_url":"https://api.github.com/users/springtestdbunit/following{/other_user}","gists_url":"https://api.github.com/users/springtestdbunit/gists{/gist_id}","starred_url":"https://api.github.com/users/springtestdbunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/springtestdbunit/subscriptions","organizations_url":"https://api.github.com/users/springtestdbunit/orgs","repos_url":"https://api.github.com/users/springtestdbunit/repos","events_url":"https://api.github.com/users/springtestdbunit/events{/privacy}","received_events_url":"https://api.github.com/users/springtestdbunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/springtestdbunit/spring-test-dbunit","description":"Integration between the Spring testing framework and DBUnit","fork":false,"url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit","forks_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/forks","keys_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/teams","hooks_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/hooks","issue_events_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/events{/number}","events_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/events","assignees_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/assignees{/user}","branches_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/branches{/branch}","tags_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/tags","blobs_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/statuses/{sha}","languages_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/languages","stargazers_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/stargazers","contributors_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/contributors","subscribers_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/subscribers","subscription_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/subscription","commits_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/contents/{+path}","compare_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/merges","archive_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/downloads","issues_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues{/number}","pulls_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls{/number}","milestones_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/milestones{/number}","notifications_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/labels{/name}","releases_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/releases{/id}","deployments_url":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/deployments","created_at":"2010-12-12T18:24:31Z","updated_at":"2016-08-14T04:23:16Z","pushed_at":"2016-06-23T23:20:56Z","git_url":"git://github.com/springtestdbunit/spring-test-dbunit.git","ssh_url":"git@github.com:springtestdbunit/spring-test-dbunit.git","clone_url":"https://github.com/springtestdbunit/spring-test-dbunit.git","svn_url":"https://github.com/springtestdbunit/spring-test-dbunit","homepage":"http://springtestdbunit.github.com/spring-test-dbunit/","size":3451,"stargazers_count":227,"watchers_count":227,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":141,"mirror_url":null,"open_issues_count":19,"forks":141,"open_issues":19,"watchers":227,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117"},"html":{"href":"https://github.com/springtestdbunit/spring-test-dbunit/pull/117"},"issue":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/117"},"comments":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/springtestdbunit/spring-test-dbunit/statuses/340b311d9924c2485a5930e99b8edccb0ee7ffd2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":29,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"mikebl71"}}