{"action":"created","comment":{"url":"https://api.github.com/repos/franfontana/agenda/pulls/comments/39892715","id":39892715,"diff_hunk":"@@ -0,0 +1,111 @@\n+package agenda;\n+\n+import static org.junit.Assert.*;\n+\n+import java.util.ArrayList;\n+import java.util.UUID;\n+\n+import org.junit.Test;\n+\n+public class SearchTestCase {\n+\t\n+\t@Test\n+\tpublic void testAltaDeContacto(){\n+\t\tArrayList<Contacto> miLista = new ArrayList<Contacto>();\n+\t\tAgenda agenda = new Agenda(miLista);\n+\t\tString name = UUID.randomUUID().toString();\n+\t\tString lastname = UUID.randomUUID().toString();\n+\t\tString email = UUID.randomUUID().toString();\n+\t\tString phone = UUID.randomUUID().toString();\n+\t\tString nombreTest = new String(name);\n+\t\tString apellidoTest = new String(lastname);\n+\t\tString emailTest = new String(email);\n+\t\tString movilTest = new String(phone);\n+\t\tassertTrue(agenda.agregarContacto(nombreTest, apellidoTest, emailTest, movilTest));\n+\t\tassertEquals(1, miLista.size());\n+\t\tSystem.out.println(\"Guarda un nuevo contacto y corrobora en lista\");\n+\t}\n+\t\n+\t@Test\n+\tpublic void testEliminacionDeContacto(){\n+\t\tArrayList<Contacto> miLista = new ArrayList<Contacto>();\n+\t\tAgenda agenda = new Agenda(miLista);\n+\t\tString name = UUID.randomUUID().toString();\n+\t\tString lastname = UUID.randomUUID().toString();\n+\t\tString email = UUID.randomUUID().toString();\n+\t\tString phone = UUID.randomUUID().toString();\n+\t\tString nombreTest = new String(name);\n+\t\tString apellidoTest = new String(lastname);\n+\t\tString emailTest = new String(email);\n+\t\tString movilTest = new String(phone);\n+\t\tassertTrue(agenda.agregarContacto(nombreTest, apellidoTest, emailTest, movilTest));\n+\t\tassertEquals(1,miLista.size());\n+\t\tassertTrue(agenda.eliminarContacto(name, lastname, email, phone));\n+\t\tassertEquals(0,miLista.size());\n+\t\tSystem.out.println(\"Elimina un contacto generado y corrobora en lista\");\n+\t}\n+\t\n+\t@Test\n+\tpublic void testBusquedaContactoExistente(){\n+\t\tArrayList<Contacto> miLista = new ArrayList<Contacto>();\n+\t\tAgenda agenda = new Agenda(miLista);\n+\t\tString name = UUID.randomUUID().toString();\n+\t\tString nombreTest = new String(name);\n+\t\tString apellidoTest = new String(\"b\");\n+\t\tString emailTest = new String(\"c\");\n+\t\tString movilTest = new String(\"d\");\n+\t\tassertTrue(agenda.agregarContacto(nombreTest, apellidoTest, emailTest, movilTest));\n+\t\tContacto contacto = miLista.get(0);\n+\t\tArrayList<Contacto> contactosEncontrados = agenda.buscarContacto(name);\n+\t\tassertEquals(1, contactosEncontrados.size());\t\t\t\n+\t\tassertEquals(contactosEncontrados.get(0).getNombre(), contacto.getNombre());\n+\t\tassertEquals(contactosEncontrados.get(0).getApellido(), contacto.getApellido());\n+\t\tassertEquals(contactosEncontrados.get(0).getEmail(), contacto.getEmail());\n+\t\tassertEquals(contactosEncontrados.get(0).getMovil(), contacto.getMovil());\n+\t\tSystem.out.println(\"\\nEncuentra contacto existente\");\n+\t}\n+\t\n+\t@Test\n+\tpublic void testBusquedaContactoInexistente(){\n+\t\tArrayList<Contacto> miLista = new ArrayList<Contacto>();\n+\t\tAgenda agenda = new Agenda(miLista);\n+\t\tString name = UUID.randomUUID().toString();\n+\t\tString lastname = UUID.randomUUID().toString();\n+\t\tString email = UUID.randomUUID().toString();\n+\t\tString phone = UUID.randomUUID().toString();\n+\t\tString nombreTest = new String(name);\n+\t\tString apellidoTest = new String(lastname);\n+\t\tString emailTest = new String(email);\n+\t\tString movilTest = new String(phone);\n+\t\tassertTrue(agenda.agregarContacto(nombreTest, apellidoTest, emailTest, movilTest));\n+\t\tString atributoTest = UUID.randomUUID().toString();\n+\t\tArrayList<Contacto> contactosEncontrados = agenda.buscarContacto(atributoTest);\n+\t\tassertTrue(contactosEncontrados.size() == 0);\n+\t\tSystem.out.println(\"No encuentra contacto inexistente\");\n+\t}\n+\t\n+\t@Test\n+\tpublic void testNoPermiteContactoDuplicado(){\n+\t\tArrayList<Contacto> miLista = new ArrayList<Contacto>();\n+\t\tAgenda agenda = new Agenda(miLista);\t\t\n+\t\tString name = UUID.randomUUID().toString();\n+\t\tString lastname = UUID.randomUUID().toString();\n+\t\tString email = UUID.randomUUID().toString();\n+\t\tString phone = UUID.randomUUID().toString();\n+\t\tString nombreTest = new String(name);\n+\t\tString apellidoTest = new String(lastname);\n+\t\tString emailTest = new String(email);\n+\t\tString movilTest = new String(phone);\n+\t\tassertTrue(agenda.agregarContacto(nombreTest, apellidoTest, emailTest, movilTest));","path":"test/agenda/SearchTestCase.java","position":99,"original_position":99,"commit_id":"e60573070975675ad0b3f3540f98f22a91cde08c","original_commit_id":"e60573070975675ad0b3f3540f98f22a91cde08c","user":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"body":"OK!!","created_at":"2015-09-18T19:34:32Z","updated_at":"2015-09-18T19:34:32Z","html_url":"https://github.com/franfontana/agenda/pull/8#discussion_r39892715","pull_request_url":"https://api.github.com/repos/franfontana/agenda/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/comments/39892715"},"html":{"href":"https://github.com/franfontana/agenda/pull/8#discussion_r39892715"},"pull_request":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/franfontana/agenda/pulls/8","id":44816166,"html_url":"https://github.com/franfontana/agenda/pull/8","diff_url":"https://github.com/franfontana/agenda/pull/8.diff","patch_url":"https://github.com/franfontana/agenda/pull/8.patch","issue_url":"https://api.github.com/repos/franfontana/agenda/issues/8","number":8,"state":"open","locked":false,"title":"Develop","user":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"body":"Genero pull request\r\nBranch: master ... comparado con Branch:develop. Para revisión de cambios y posterior merge.","created_at":"2015-09-11T18:51:19Z","updated_at":"2015-09-18T19:34:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a88d8f52b7876e052d183ac7ef6f8f81c23d4050","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/franfontana/agenda/pulls/8/commits","review_comments_url":"https://api.github.com/repos/franfontana/agenda/pulls/8/comments","review_comment_url":"https://api.github.com/repos/franfontana/agenda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/franfontana/agenda/issues/8/comments","statuses_url":"https://api.github.com/repos/franfontana/agenda/statuses/e60573070975675ad0b3f3540f98f22a91cde08c","head":{"label":"franfontana:develop","ref":"develop","sha":"e60573070975675ad0b3f3540f98f22a91cde08c","user":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"repo":{"id":41043437,"name":"agenda","full_name":"franfontana/agenda","owner":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/franfontana/agenda","description":"Administración y registro de contactos - Ejercicio","fork":false,"url":"https://api.github.com/repos/franfontana/agenda","forks_url":"https://api.github.com/repos/franfontana/agenda/forks","keys_url":"https://api.github.com/repos/franfontana/agenda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/franfontana/agenda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/franfontana/agenda/teams","hooks_url":"https://api.github.com/repos/franfontana/agenda/hooks","issue_events_url":"https://api.github.com/repos/franfontana/agenda/issues/events{/number}","events_url":"https://api.github.com/repos/franfontana/agenda/events","assignees_url":"https://api.github.com/repos/franfontana/agenda/assignees{/user}","branches_url":"https://api.github.com/repos/franfontana/agenda/branches{/branch}","tags_url":"https://api.github.com/repos/franfontana/agenda/tags","blobs_url":"https://api.github.com/repos/franfontana/agenda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/franfontana/agenda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/franfontana/agenda/git/refs{/sha}","trees_url":"https://api.github.com/repos/franfontana/agenda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/franfontana/agenda/statuses/{sha}","languages_url":"https://api.github.com/repos/franfontana/agenda/languages","stargazers_url":"https://api.github.com/repos/franfontana/agenda/stargazers","contributors_url":"https://api.github.com/repos/franfontana/agenda/contributors","subscribers_url":"https://api.github.com/repos/franfontana/agenda/subscribers","subscription_url":"https://api.github.com/repos/franfontana/agenda/subscription","commits_url":"https://api.github.com/repos/franfontana/agenda/commits{/sha}","git_commits_url":"https://api.github.com/repos/franfontana/agenda/git/commits{/sha}","comments_url":"https://api.github.com/repos/franfontana/agenda/comments{/number}","issue_comment_url":"https://api.github.com/repos/franfontana/agenda/issues/comments{/number}","contents_url":"https://api.github.com/repos/franfontana/agenda/contents/{+path}","compare_url":"https://api.github.com/repos/franfontana/agenda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/franfontana/agenda/merges","archive_url":"https://api.github.com/repos/franfontana/agenda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/franfontana/agenda/downloads","issues_url":"https://api.github.com/repos/franfontana/agenda/issues{/number}","pulls_url":"https://api.github.com/repos/franfontana/agenda/pulls{/number}","milestones_url":"https://api.github.com/repos/franfontana/agenda/milestones{/number}","notifications_url":"https://api.github.com/repos/franfontana/agenda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/franfontana/agenda/labels{/name}","releases_url":"https://api.github.com/repos/franfontana/agenda/releases{/id}","created_at":"2015-08-19T15:41:28Z","updated_at":"2015-08-19T16:03:16Z","pushed_at":"2015-09-17T18:26:32Z","git_url":"git://github.com/franfontana/agenda.git","ssh_url":"git@github.com:franfontana/agenda.git","clone_url":"https://github.com/franfontana/agenda.git","svn_url":"https://github.com/franfontana/agenda","homepage":null,"size":220,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"franfontana:master","ref":"master","sha":"7df51729c1af75508dafd2250a9e88449635e889","user":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"repo":{"id":41043437,"name":"agenda","full_name":"franfontana/agenda","owner":{"login":"franfontana","id":12447864,"avatar_url":"https://avatars.githubusercontent.com/u/12447864?v=3","gravatar_id":"","url":"https://api.github.com/users/franfontana","html_url":"https://github.com/franfontana","followers_url":"https://api.github.com/users/franfontana/followers","following_url":"https://api.github.com/users/franfontana/following{/other_user}","gists_url":"https://api.github.com/users/franfontana/gists{/gist_id}","starred_url":"https://api.github.com/users/franfontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franfontana/subscriptions","organizations_url":"https://api.github.com/users/franfontana/orgs","repos_url":"https://api.github.com/users/franfontana/repos","events_url":"https://api.github.com/users/franfontana/events{/privacy}","received_events_url":"https://api.github.com/users/franfontana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/franfontana/agenda","description":"Administración y registro de contactos - Ejercicio","fork":false,"url":"https://api.github.com/repos/franfontana/agenda","forks_url":"https://api.github.com/repos/franfontana/agenda/forks","keys_url":"https://api.github.com/repos/franfontana/agenda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/franfontana/agenda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/franfontana/agenda/teams","hooks_url":"https://api.github.com/repos/franfontana/agenda/hooks","issue_events_url":"https://api.github.com/repos/franfontana/agenda/issues/events{/number}","events_url":"https://api.github.com/repos/franfontana/agenda/events","assignees_url":"https://api.github.com/repos/franfontana/agenda/assignees{/user}","branches_url":"https://api.github.com/repos/franfontana/agenda/branches{/branch}","tags_url":"https://api.github.com/repos/franfontana/agenda/tags","blobs_url":"https://api.github.com/repos/franfontana/agenda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/franfontana/agenda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/franfontana/agenda/git/refs{/sha}","trees_url":"https://api.github.com/repos/franfontana/agenda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/franfontana/agenda/statuses/{sha}","languages_url":"https://api.github.com/repos/franfontana/agenda/languages","stargazers_url":"https://api.github.com/repos/franfontana/agenda/stargazers","contributors_url":"https://api.github.com/repos/franfontana/agenda/contributors","subscribers_url":"https://api.github.com/repos/franfontana/agenda/subscribers","subscription_url":"https://api.github.com/repos/franfontana/agenda/subscription","commits_url":"https://api.github.com/repos/franfontana/agenda/commits{/sha}","git_commits_url":"https://api.github.com/repos/franfontana/agenda/git/commits{/sha}","comments_url":"https://api.github.com/repos/franfontana/agenda/comments{/number}","issue_comment_url":"https://api.github.com/repos/franfontana/agenda/issues/comments{/number}","contents_url":"https://api.github.com/repos/franfontana/agenda/contents/{+path}","compare_url":"https://api.github.com/repos/franfontana/agenda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/franfontana/agenda/merges","archive_url":"https://api.github.com/repos/franfontana/agenda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/franfontana/agenda/downloads","issues_url":"https://api.github.com/repos/franfontana/agenda/issues{/number}","pulls_url":"https://api.github.com/repos/franfontana/agenda/pulls{/number}","milestones_url":"https://api.github.com/repos/franfontana/agenda/milestones{/number}","notifications_url":"https://api.github.com/repos/franfontana/agenda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/franfontana/agenda/labels{/name}","releases_url":"https://api.github.com/repos/franfontana/agenda/releases{/id}","created_at":"2015-08-19T15:41:28Z","updated_at":"2015-08-19T16:03:16Z","pushed_at":"2015-09-17T18:26:32Z","git_url":"git://github.com/franfontana/agenda.git","ssh_url":"git@github.com:franfontana/agenda.git","clone_url":"https://github.com/franfontana/agenda.git","svn_url":"https://github.com/franfontana/agenda","homepage":null,"size":220,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/8"},"html":{"href":"https://github.com/franfontana/agenda/pull/8"},"issue":{"href":"https://api.github.com/repos/franfontana/agenda/issues/8"},"comments":{"href":"https://api.github.com/repos/franfontana/agenda/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/franfontana/agenda/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/franfontana/agenda/statuses/e60573070975675ad0b3f3540f98f22a91cde08c"}}}}