{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/daikon/pulls/comments/139346207","pull_request_review_id":63264594,"id":139346207,"diff_hunk":"@@ -0,0 +1,97 @@\n+package org.talend.tqlmongo.criteria;\n+\n+import java.util.Arrays;\n+import java.util.Collections;\n+\n+import org.junit.Assert;\n+import org.junit.Test;\n+import org.springframework.data.mongodb.core.query.Criteria;\n+\n+/**\n+ * Created by gmzoughi on 06/07/16.\n+ */\n+public class TestMongoCriteria_In extends TestMongoCriteria_Abstract {\n+\n+    @Test\n+    public void testParseFieldInQuoted1() throws Exception {\n+        Criteria criteria = doTest(\"field1 in ['value1']\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Collections.singletonList(\"value1\"));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInQuoted2() throws Exception {\n+        Criteria criteria = doTest(\"field1 in ['value1', 'value2']\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(\"value1\", \"value2\"));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInQuoted5() throws Exception {\n+        Criteria criteria = doTest(\"field1 in ['value1', 'value2', 'value3', 'value4', 'value5']\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(\"value1\", \"value2\", \"value3\", \"value4\", \"value5\"));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInInt1() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Collections.singletonList(11L));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInInt2() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11, 22]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(11L, 22L));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInInt5() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11, 22, 33, 44, 55]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(11L, 22L, 33L, 44L, 55L));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInDecimal1() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11.11]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Collections.singletonList(11.11));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInDecimal2() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11.11, 22.22]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(11.11, 22.22));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInDecimal5() throws Exception {\n+        Criteria criteria = doTest(\"field1 in [11.11, 22.22, 33.33, 44.44, 55.55]\");\n+        Criteria expectedCriteria = Criteria.where(\"field1\").in(Arrays.asList(11.11, 22.22, 33.33, 44.44, 55.55));\n+        Assert.assertEquals(expectedCriteria, criteria);\n+    }\n+\n+    @Test\n+    public void testParseFieldInString() throws Exception {","path":"daikon-tql/daikon-tql-mongo/src/test/java/org/talend/tqlmongo/criteria/TestMongoCriteria_In.java","position":79,"original_position":79,"commit_id":"64f4a85dc7cef763b45fd693ad2bcbf809856275","original_commit_id":"64f4a85dc7cef763b45fd693ad2bcbf809856275","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [JUnit tests should include assert() or fail()](https://www.codacy.com/app/Talend/daikon/pullRequest?prid=917116)","created_at":"2017-09-18T06:58:21Z","updated_at":"2017-09-18T06:58:21Z","html_url":"https://github.com/Talend/daikon/pull/278#discussion_r139346207","pull_request_url":"https://api.github.com/repos/Talend/daikon/pulls/278","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Talend/daikon/pulls/comments/139346207"},"html":{"href":"https://github.com/Talend/daikon/pull/278#discussion_r139346207"},"pull_request":{"href":"https://api.github.com/repos/Talend/daikon/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/daikon/pulls/278","id":141349332,"html_url":"https://github.com/Talend/daikon/pull/278","diff_url":"https://github.com/Talend/daikon/pull/278.diff","patch_url":"https://github.com/Talend/daikon/pull/278.patch","issue_url":"https://api.github.com/repos/Talend/daikon/issues/278","number":278,"state":"open","locked":false,"title":"TDS-1288 : TQL is not open source.","user":{"login":"gmzoughi","id":15381144,"avatar_url":"https://avatars2.githubusercontent.com/u/15381144?v=4","gravatar_id":"","url":"https://api.github.com/users/gmzoughi","html_url":"https://github.com/gmzoughi","followers_url":"https://api.github.com/users/gmzoughi/followers","following_url":"https://api.github.com/users/gmzoughi/following{/other_user}","gists_url":"https://api.github.com/users/gmzoughi/gists{/gist_id}","starred_url":"https://api.github.com/users/gmzoughi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmzoughi/subscriptions","organizations_url":"https://api.github.com/users/gmzoughi/orgs","repos_url":"https://api.github.com/users/gmzoughi/repos","events_url":"https://api.github.com/users/gmzoughi/events{/privacy}","received_events_url":"https://api.github.com/users/gmzoughi/received_events","type":"User","site_admin":false},"body":"**What is the problem this Pull Request is trying to solve?**\r\n \r\n**What is the chosen solution to this problem?**\r\n \r\n**Link to the JIRA issue**\r\n<!--e.g. https://jira.talendforge.org/browse/XXX -->\r\n \r\n**Please check if the Pull Request fulfills these requirements**\r\n- [x] The PR commit message follows our [guidelines](../CONTRIBUTING.md)\r\n- [x] Tests for the changes have been added (for bug fixes / features, coverage should be over 75% in the new code)\r\n- [x] Docs have been added / updated (for bug fixes / features)\r\n- [x] Related design / discussions / pages (not in JIRA), if any, are all linked or available in the Pull Request\r\n\r\n<!-- You can add more checkboxes here -->\r\n \r\n**[ ] This Pull Request introduces a breaking change**\r\n \r\n<!-- **Original Template** -->\r\n<!-- https://github.com/Talend/tools/blob/master/tools-root-github/.github/PULL_REQUEST_TEMPLATE.md -->\r\n","created_at":"2017-09-15T16:17:14Z","updated_at":"2017-09-18T06:58:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc7469e4f8646e8e7cfdc85f96c82fd2d01cf59a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"afourmi","id":7254056,"avatar_url":"https://avatars3.githubusercontent.com/u/7254056?v=4","gravatar_id":"","url":"https://api.github.com/users/afourmi","html_url":"https://github.com/afourmi","followers_url":"https://api.github.com/users/afourmi/followers","following_url":"https://api.github.com/users/afourmi/following{/other_user}","gists_url":"https://api.github.com/users/afourmi/gists{/gist_id}","starred_url":"https://api.github.com/users/afourmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afourmi/subscriptions","organizations_url":"https://api.github.com/users/afourmi/orgs","repos_url":"https://api.github.com/users/afourmi/repos","events_url":"https://api.github.com/users/afourmi/events{/privacy}","received_events_url":"https://api.github.com/users/afourmi/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/daikon/pulls/278/commits","review_comments_url":"https://api.github.com/repos/Talend/daikon/pulls/278/comments","review_comment_url":"https://api.github.com/repos/Talend/daikon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/daikon/issues/278/comments","statuses_url":"https://api.github.com/repos/Talend/daikon/statuses/64f4a85dc7cef763b45fd693ad2bcbf809856275","head":{"label":"Talend:gmzoughi/TDS-1288","ref":"gmzoughi/TDS-1288","sha":"64f4a85dc7cef763b45fd693ad2bcbf809856275","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":42255499,"name":"daikon","full_name":"Talend/daikon","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/daikon","description":"Commons back-end java classes shared by dataprep and components services (for now)","fork":false,"url":"https://api.github.com/repos/Talend/daikon","forks_url":"https://api.github.com/repos/Talend/daikon/forks","keys_url":"https://api.github.com/repos/Talend/daikon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/daikon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/daikon/teams","hooks_url":"https://api.github.com/repos/Talend/daikon/hooks","issue_events_url":"https://api.github.com/repos/Talend/daikon/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/daikon/events","assignees_url":"https://api.github.com/repos/Talend/daikon/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/daikon/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/daikon/tags","blobs_url":"https://api.github.com/repos/Talend/daikon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/daikon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/daikon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/daikon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/daikon/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/daikon/languages","stargazers_url":"https://api.github.com/repos/Talend/daikon/stargazers","contributors_url":"https://api.github.com/repos/Talend/daikon/contributors","subscribers_url":"https://api.github.com/repos/Talend/daikon/subscribers","subscription_url":"https://api.github.com/repos/Talend/daikon/subscription","commits_url":"https://api.github.com/repos/Talend/daikon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/daikon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/daikon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/daikon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/daikon/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/daikon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/daikon/merges","archive_url":"https://api.github.com/repos/Talend/daikon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/daikon/downloads","issues_url":"https://api.github.com/repos/Talend/daikon/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/daikon/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/daikon/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/daikon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/daikon/labels{/name}","releases_url":"https://api.github.com/repos/Talend/daikon/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/daikon/deployments","created_at":"2015-09-10T16:08:46Z","updated_at":"2017-03-29T20:30:05Z","pushed_at":"2017-09-18T06:56:05Z","git_url":"git://github.com/Talend/daikon.git","ssh_url":"git@github.com:Talend/daikon.git","clone_url":"https://github.com/Talend/daikon.git","svn_url":"https://github.com/Talend/daikon","homepage":null,"size":3696,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"6d994aeac87d1d5bb0d45a0ee2cef3b5a9959249","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":42255499,"name":"daikon","full_name":"Talend/daikon","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/daikon","description":"Commons back-end java classes shared by dataprep and components services (for now)","fork":false,"url":"https://api.github.com/repos/Talend/daikon","forks_url":"https://api.github.com/repos/Talend/daikon/forks","keys_url":"https://api.github.com/repos/Talend/daikon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/daikon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/daikon/teams","hooks_url":"https://api.github.com/repos/Talend/daikon/hooks","issue_events_url":"https://api.github.com/repos/Talend/daikon/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/daikon/events","assignees_url":"https://api.github.com/repos/Talend/daikon/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/daikon/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/daikon/tags","blobs_url":"https://api.github.com/repos/Talend/daikon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/daikon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/daikon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/daikon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/daikon/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/daikon/languages","stargazers_url":"https://api.github.com/repos/Talend/daikon/stargazers","contributors_url":"https://api.github.com/repos/Talend/daikon/contributors","subscribers_url":"https://api.github.com/repos/Talend/daikon/subscribers","subscription_url":"https://api.github.com/repos/Talend/daikon/subscription","commits_url":"https://api.github.com/repos/Talend/daikon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/daikon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/daikon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/daikon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/daikon/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/daikon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/daikon/merges","archive_url":"https://api.github.com/repos/Talend/daikon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/daikon/downloads","issues_url":"https://api.github.com/repos/Talend/daikon/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/daikon/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/daikon/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/daikon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/daikon/labels{/name}","releases_url":"https://api.github.com/repos/Talend/daikon/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/daikon/deployments","created_at":"2015-09-10T16:08:46Z","updated_at":"2017-03-29T20:30:05Z","pushed_at":"2017-09-18T06:56:05Z","git_url":"git://github.com/Talend/daikon.git","ssh_url":"git@github.com:Talend/daikon.git","clone_url":"https://github.com/Talend/daikon.git","svn_url":"https://github.com/Talend/daikon","homepage":null,"size":3696,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/daikon/pulls/278"},"html":{"href":"https://github.com/Talend/daikon/pull/278"},"issue":{"href":"https://api.github.com/repos/Talend/daikon/issues/278"},"comments":{"href":"https://api.github.com/repos/Talend/daikon/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/daikon/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/daikon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/daikon/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/daikon/statuses/64f4a85dc7cef763b45fd693ad2bcbf809856275"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codacy-bot"}}