{"action":"created","comment":{"url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/comments/89966300","pull_request_review_id":10492527,"id":89966300,"diff_hunk":"@@ -0,0 +1,36 @@\n+package org.arquillian.algeron.pact.provider.core;\n+\n+import org.junit.Test;\n+\n+import java.util.List;\n+import java.util.regex.Pattern;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+\n+public class ArgumentPatternMatcherTest {\n+\n+    @Test\n+    public void should_extract_arguments_if_number() {\n+        List<String> arguments = ArgumentPatternMatcher.arguments(Pattern.compile(\"I have (\\\\d+) cukes in my belly\"), \"I have 36 cukes in my belly\");\n+        assertThat(arguments).containsExactly(\"36\");\n+    }\n+\n+    @Test\n+    public void should_extract_arguments_if_list() {\n+        List<String> arguments = ArgumentPatternMatcher.arguments(Pattern.compile(\"The following animals: (.*)\"), \"The following animals: dog, cat, mouse\");\n+        assertThat(arguments).containsExactly(\"dog, cat, mouse\");","path":"pact/provider/core/src/test/java/org/arquillian/algeron/pact/provider/core/ArgumentPatternMatcherTest.java","position":21,"original_position":21,"commit_id":"e73ef936b63b06ebfda5bac04354536b3e267815","original_commit_id":"fec4d0a352976b6e2e6796b77dcfe83e87660e01","user":{"login":"bartoszmajsak","id":719616,"avatar_url":"https://avatars.githubusercontent.com/u/719616?v=3","gravatar_id":"","url":"https://api.github.com/users/bartoszmajsak","html_url":"https://github.com/bartoszmajsak","followers_url":"https://api.github.com/users/bartoszmajsak/followers","following_url":"https://api.github.com/users/bartoszmajsak/following{/other_user}","gists_url":"https://api.github.com/users/bartoszmajsak/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszmajsak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszmajsak/subscriptions","organizations_url":"https://api.github.com/users/bartoszmajsak/orgs","repos_url":"https://api.github.com/users/bartoszmajsak/repos","events_url":"https://api.github.com/users/bartoszmajsak/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszmajsak/received_events","type":"User","site_admin":false},"body":"Good to know, it's an old code :) Yet it proves I have afterthoughts sometimes :D","created_at":"2016-11-29T09:10:13Z","updated_at":"2016-11-29T09:10:13Z","html_url":"https://github.com/arquillian/arquillian-algeron/pull/50#discussion_r89966300","pull_request_url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/comments/89966300"},"html":{"href":"https://github.com/arquillian/arquillian-algeron/pull/50#discussion_r89966300"},"pull_request":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50","id":95445806,"html_url":"https://github.com/arquillian/arquillian-algeron/pull/50","diff_url":"https://github.com/arquillian/arquillian-algeron/pull/50.diff","patch_url":"https://github.com/arquillian/arquillian-algeron/pull/50.patch","issue_url":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/50","number":50,"state":"open","locked":false,"title":"Adds support for getting state parameters from string using regexp","user":{"login":"lordofthejars","id":1517153,"avatar_url":"https://avatars.githubusercontent.com/u/1517153?v=3","gravatar_id":"","url":"https://api.github.com/users/lordofthejars","html_url":"https://github.com/lordofthejars","followers_url":"https://api.github.com/users/lordofthejars/followers","following_url":"https://api.github.com/users/lordofthejars/following{/other_user}","gists_url":"https://api.github.com/users/lordofthejars/gists{/gist_id}","starred_url":"https://api.github.com/users/lordofthejars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordofthejars/subscriptions","organizations_url":"https://api.github.com/users/lordofthejars/orgs","repos_url":"https://api.github.com/users/lordofthejars/repos","events_url":"https://api.github.com/users/lordofthejars/events{/privacy}","received_events_url":"https://api.github.com/users/lordofthejars/received_events","type":"User","site_admin":false},"body":"\r\n#### Short description of what this resolves:\r\n\r\nCurrently `@States` only support state names and passing as a `Map` a map of parameters.\r\nImplement that you can pass parameters as it happens with Cucumber, something like:\r\n\r\nConsumer\r\n`.states(\"I have 36 cukes in my belly\")`\r\n`.states(\"The following animals: cow, pig, bug\")`\r\n\r\nProvider\r\n`@State(\"I have (\\\\d+) cukes in my belly\")\r\npublic void state(int numberOfCakes){}`\r\n`@State(\"The following animals: (.*)\")\r\npublic void state(List<String> animals){}`\r\n\r\n#### Changes proposed in this pull request:\r\n\r\n- Get states and compare using Regular expressions if they fit on state method parameters.\r\n\r\n**Fixes**: #47 \r\n\r\n","created_at":"2016-11-28T06:44:36Z","updated_at":"2016-11-29T09:10:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5167f53622b386b598e90269e722692866a2f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50/commits","review_comments_url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50/comments","review_comment_url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/50/comments","statuses_url":"https://api.github.com/repos/arquillian/arquillian-algeron/statuses/e73ef936b63b06ebfda5bac04354536b3e267815","head":{"label":"lordofthejars:issue-47","ref":"issue-47","sha":"e73ef936b63b06ebfda5bac04354536b3e267815","user":{"login":"lordofthejars","id":1517153,"avatar_url":"https://avatars.githubusercontent.com/u/1517153?v=3","gravatar_id":"","url":"https://api.github.com/users/lordofthejars","html_url":"https://github.com/lordofthejars","followers_url":"https://api.github.com/users/lordofthejars/followers","following_url":"https://api.github.com/users/lordofthejars/following{/other_user}","gists_url":"https://api.github.com/users/lordofthejars/gists{/gist_id}","starred_url":"https://api.github.com/users/lordofthejars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordofthejars/subscriptions","organizations_url":"https://api.github.com/users/lordofthejars/orgs","repos_url":"https://api.github.com/users/lordofthejars/repos","events_url":"https://api.github.com/users/lordofthejars/events{/privacy}","received_events_url":"https://api.github.com/users/lordofthejars/received_events","type":"User","site_admin":false},"repo":{"id":74022705,"name":"arquillian-algeron","full_name":"lordofthejars/arquillian-algeron","owner":{"login":"lordofthejars","id":1517153,"avatar_url":"https://avatars.githubusercontent.com/u/1517153?v=3","gravatar_id":"","url":"https://api.github.com/users/lordofthejars","html_url":"https://github.com/lordofthejars","followers_url":"https://api.github.com/users/lordofthejars/followers","following_url":"https://api.github.com/users/lordofthejars/following{/other_user}","gists_url":"https://api.github.com/users/lordofthejars/gists{/gist_id}","starred_url":"https://api.github.com/users/lordofthejars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordofthejars/subscriptions","organizations_url":"https://api.github.com/users/lordofthejars/orgs","repos_url":"https://api.github.com/users/lordofthejars/repos","events_url":"https://api.github.com/users/lordofthejars/events{/privacy}","received_events_url":"https://api.github.com/users/lordofthejars/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lordofthejars/arquillian-algeron","description":null,"fork":true,"url":"https://api.github.com/repos/lordofthejars/arquillian-algeron","forks_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/forks","keys_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/teams","hooks_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/hooks","issue_events_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/issues/events{/number}","events_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/events","assignees_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/assignees{/user}","branches_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/branches{/branch}","tags_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/tags","blobs_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/git/refs{/sha}","trees_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/statuses/{sha}","languages_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/languages","stargazers_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/stargazers","contributors_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/contributors","subscribers_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/subscribers","subscription_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/subscription","commits_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/commits{/sha}","git_commits_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/git/commits{/sha}","comments_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/comments{/number}","issue_comment_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/issues/comments{/number}","contents_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/contents/{+path}","compare_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/merges","archive_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/downloads","issues_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/issues{/number}","pulls_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/pulls{/number}","milestones_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/milestones{/number}","notifications_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/labels{/name}","releases_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/releases{/id}","deployments_url":"https://api.github.com/repos/lordofthejars/arquillian-algeron/deployments","created_at":"2016-11-17T11:57:04Z","updated_at":"2016-11-17T11:57:05Z","pushed_at":"2016-11-28T12:37:48Z","git_url":"git://github.com/lordofthejars/arquillian-algeron.git","ssh_url":"git@github.com:lordofthejars/arquillian-algeron.git","clone_url":"https://github.com/lordofthejars/arquillian-algeron.git","svn_url":"https://github.com/lordofthejars/arquillian-algeron","homepage":null,"size":344,"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":"arquillian:master","ref":"master","sha":"f5d8f5e8959f4f11a2a30f2b8e6076b577e7d765","user":{"login":"arquillian","id":330981,"avatar_url":"https://avatars.githubusercontent.com/u/330981?v=3","gravatar_id":"","url":"https://api.github.com/users/arquillian","html_url":"https://github.com/arquillian","followers_url":"https://api.github.com/users/arquillian/followers","following_url":"https://api.github.com/users/arquillian/following{/other_user}","gists_url":"https://api.github.com/users/arquillian/gists{/gist_id}","starred_url":"https://api.github.com/users/arquillian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arquillian/subscriptions","organizations_url":"https://api.github.com/users/arquillian/orgs","repos_url":"https://api.github.com/users/arquillian/repos","events_url":"https://api.github.com/users/arquillian/events{/privacy}","received_events_url":"https://api.github.com/users/arquillian/received_events","type":"Organization","site_admin":false},"repo":{"id":67030086,"name":"arquillian-algeron","full_name":"arquillian/arquillian-algeron","owner":{"login":"arquillian","id":330981,"avatar_url":"https://avatars.githubusercontent.com/u/330981?v=3","gravatar_id":"","url":"https://api.github.com/users/arquillian","html_url":"https://github.com/arquillian","followers_url":"https://api.github.com/users/arquillian/followers","following_url":"https://api.github.com/users/arquillian/following{/other_user}","gists_url":"https://api.github.com/users/arquillian/gists{/gist_id}","starred_url":"https://api.github.com/users/arquillian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arquillian/subscriptions","organizations_url":"https://api.github.com/users/arquillian/orgs","repos_url":"https://api.github.com/users/arquillian/repos","events_url":"https://api.github.com/users/arquillian/events{/privacy}","received_events_url":"https://api.github.com/users/arquillian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/arquillian/arquillian-algeron","description":null,"fork":false,"url":"https://api.github.com/repos/arquillian/arquillian-algeron","forks_url":"https://api.github.com/repos/arquillian/arquillian-algeron/forks","keys_url":"https://api.github.com/repos/arquillian/arquillian-algeron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arquillian/arquillian-algeron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arquillian/arquillian-algeron/teams","hooks_url":"https://api.github.com/repos/arquillian/arquillian-algeron/hooks","issue_events_url":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/events{/number}","events_url":"https://api.github.com/repos/arquillian/arquillian-algeron/events","assignees_url":"https://api.github.com/repos/arquillian/arquillian-algeron/assignees{/user}","branches_url":"https://api.github.com/repos/arquillian/arquillian-algeron/branches{/branch}","tags_url":"https://api.github.com/repos/arquillian/arquillian-algeron/tags","blobs_url":"https://api.github.com/repos/arquillian/arquillian-algeron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arquillian/arquillian-algeron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arquillian/arquillian-algeron/git/refs{/sha}","trees_url":"https://api.github.com/repos/arquillian/arquillian-algeron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arquillian/arquillian-algeron/statuses/{sha}","languages_url":"https://api.github.com/repos/arquillian/arquillian-algeron/languages","stargazers_url":"https://api.github.com/repos/arquillian/arquillian-algeron/stargazers","contributors_url":"https://api.github.com/repos/arquillian/arquillian-algeron/contributors","subscribers_url":"https://api.github.com/repos/arquillian/arquillian-algeron/subscribers","subscription_url":"https://api.github.com/repos/arquillian/arquillian-algeron/subscription","commits_url":"https://api.github.com/repos/arquillian/arquillian-algeron/commits{/sha}","git_commits_url":"https://api.github.com/repos/arquillian/arquillian-algeron/git/commits{/sha}","comments_url":"https://api.github.com/repos/arquillian/arquillian-algeron/comments{/number}","issue_comment_url":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/comments{/number}","contents_url":"https://api.github.com/repos/arquillian/arquillian-algeron/contents/{+path}","compare_url":"https://api.github.com/repos/arquillian/arquillian-algeron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arquillian/arquillian-algeron/merges","archive_url":"https://api.github.com/repos/arquillian/arquillian-algeron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arquillian/arquillian-algeron/downloads","issues_url":"https://api.github.com/repos/arquillian/arquillian-algeron/issues{/number}","pulls_url":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls{/number}","milestones_url":"https://api.github.com/repos/arquillian/arquillian-algeron/milestones{/number}","notifications_url":"https://api.github.com/repos/arquillian/arquillian-algeron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arquillian/arquillian-algeron/labels{/name}","releases_url":"https://api.github.com/repos/arquillian/arquillian-algeron/releases{/id}","deployments_url":"https://api.github.com/repos/arquillian/arquillian-algeron/deployments","created_at":"2016-08-31T11:06:26Z","updated_at":"2016-11-22T09:10:53Z","pushed_at":"2016-11-28T12:41:45Z","git_url":"git://github.com/arquillian/arquillian-algeron.git","ssh_url":"git@github.com:arquillian/arquillian-algeron.git","clone_url":"https://github.com/arquillian/arquillian-algeron.git","svn_url":"https://github.com/arquillian/arquillian-algeron","homepage":null,"size":448,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50"},"html":{"href":"https://github.com/arquillian/arquillian-algeron/pull/50"},"issue":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/50"},"comments":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/arquillian/arquillian-algeron/statuses/e73ef936b63b06ebfda5bac04354536b3e267815"}}}}
{"actor":{"display_login":"bartoszmajsak"}}