{"action":"created","comment":{"url":"https://api.github.com/repos/JabRef/jabref/pulls/comments/61684642","id":61684642,"diff_hunk":"@@ -0,0 +1,87 @@\n+package net.sf.jabref.exporter;\n+\n+import java.io.File;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.nio.charset.Charset;\n+import java.nio.file.Files;\n+import java.nio.file.Path;\n+import java.nio.file.Paths;\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.List;\n+import java.util.stream.Collectors;\n+import java.util.stream.Stream;\n+\n+import net.sf.jabref.BibDatabaseContext;\n+import net.sf.jabref.Globals;\n+import net.sf.jabref.JabRefPreferences;\n+import net.sf.jabref.MetaData;\n+import net.sf.jabref.importer.OutputPrinterToNull;\n+import net.sf.jabref.importer.fileformat.BibtexImporter;\n+import net.sf.jabref.model.database.BibDatabase;\n+import net.sf.jabref.model.entry.BibEntry;\n+\n+import com.google.common.base.Charsets;\n+import org.junit.Before;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.rules.TemporaryFolder;\n+import org.junit.runner.RunWith;\n+import org.junit.runners.Parameterized;\n+import org.junit.runners.Parameterized.Parameter;\n+import org.junit.runners.Parameterized.Parameters;\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNotNull;\n+\n+@RunWith(Parameterized.class)\n+public class MSBibExportFormatTestFiles {\n+\n+    public static BibDatabaseContext databaseContext;\n+    public static Charset charset;\n+    public File tempFile;\n+    public static MSBibExportFormat msBibExportFormat;\n+    public BibtexImporter testImporter = new BibtexImporter();\n+    public static final String PATH_TO_FILE = \"src/test/resources/net/sf/jabref/exporter/\";\n+    public String xmlFileName;\n+\n+    @Parameter\n+    public String filename;\n+\n+    @Rule\n+    public TemporaryFolder testFolder = new TemporaryFolder();\n+\n+\n+    @Parameters(name = \"{0}\")\n+    public static Collection<String> fileNames() throws IOException {\n+        List<String> files = new ArrayList<>();\n+        try (Stream<Path> stream = Files.list(Paths.get(PATH_TO_FILE))) {\n+            files = stream.map(n -> n.getFileName().toString()).filter(n -> n.endsWith(\".bib\"))\n+                    .filter(n -> n.startsWith(\"MsBibExportFormat\")).collect(Collectors.toList());\n+        }\n+        return files;\n+    }\n+\n+    @Before\n+    public void setUp() throws Exception {\n+        Globals.prefs = JabRefPreferences.getInstance();\n+        databaseContext = new BibDatabaseContext(new BibDatabase(), new MetaData());\n+        charset = Charsets.UTF_8;\n+        msBibExportFormat = new MSBibExportFormat();\n+        tempFile = testFolder.newFile();\n+    }\n+\n+    @Test\n+    public final void testPerformExport() throws IOException {\n+        xmlFileName = filename.replace(\".bib\", \".xml\");","path":"src/test/java/net/sf/jabref/exporter/MSBibExportFormatTestFiles.java","position":76,"original_position":76,"commit_id":"e321c110317f881a692e6670b3d50155b278e975","original_commit_id":"e321c110317f881a692e6670b3d50155b278e975","user":{"login":"simonharrer","id":375693,"avatar_url":"https://avatars.githubusercontent.com/u/375693?v=3","gravatar_id":"","url":"https://api.github.com/users/simonharrer","html_url":"https://github.com/simonharrer","followers_url":"https://api.github.com/users/simonharrer/followers","following_url":"https://api.github.com/users/simonharrer/following{/other_user}","gists_url":"https://api.github.com/users/simonharrer/gists{/gist_id}","starred_url":"https://api.github.com/users/simonharrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonharrer/subscriptions","organizations_url":"https://api.github.com/users/simonharrer/orgs","repos_url":"https://api.github.com/users/simonharrer/repos","events_url":"https://api.github.com/users/simonharrer/events{/privacy}","received_events_url":"https://api.github.com/users/simonharrer/received_events","type":"User","site_admin":false},"body":"Why is this a field instead of a local variable?","created_at":"2016-05-01T10:00:38Z","updated_at":"2016-05-01T10:00:38Z","html_url":"https://github.com/JabRef/jabref/pull/1241#discussion_r61684642","pull_request_url":"https://api.github.com/repos/JabRef/jabref/pulls/1241","_links":{"self":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/comments/61684642"},"html":{"href":"https://github.com/JabRef/jabref/pull/1241#discussion_r61684642"},"pull_request":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/1241"}}},"pull_request":{"url":"https://api.github.com/repos/JabRef/jabref/pulls/1241","id":67045288,"html_url":"https://github.com/JabRef/jabref/pull/1241","diff_url":"https://github.com/JabRef/jabref/pull/1241.diff","patch_url":"https://github.com/JabRef/jabref/pull/1241.patch","issue_url":"https://api.github.com/repos/JabRef/jabref/issues/1241","number":1241,"state":"open","locked":false,"title":"add test for MsBibExportFormat","user":{"login":"tschechlovdev","id":15339876,"avatar_url":"https://avatars.githubusercontent.com/u/15339876?v=3","gravatar_id":"","url":"https://api.github.com/users/tschechlovdev","html_url":"https://github.com/tschechlovdev","followers_url":"https://api.github.com/users/tschechlovdev/followers","following_url":"https://api.github.com/users/tschechlovdev/following{/other_user}","gists_url":"https://api.github.com/users/tschechlovdev/gists{/gist_id}","starred_url":"https://api.github.com/users/tschechlovdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschechlovdev/subscriptions","organizations_url":"https://api.github.com/users/tschechlovdev/orgs","repos_url":"https://api.github.com/users/tschechlovdev/repos","events_url":"https://api.github.com/users/tschechlovdev/events{/privacy}","received_events_url":"https://api.github.com/users/tschechlovdev/received_events","type":"User","site_admin":false},"body":"In this PR the class MsBibExportFormat will be tested. The logic of this class will be found at MsBibEntry.java and MsBibDatabse.java. I also edited the ADDRESS_PATTERN in MsBibEntry.java so that the regex described in the comment will be matched.","created_at":"2016-04-19T16:02:43Z","updated_at":"2016-05-01T10:00:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cd0b9a893a18ee88ed680dcab474bbfdf38dd95","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JabRef/jabref/pulls/1241/commits","review_comments_url":"https://api.github.com/repos/JabRef/jabref/pulls/1241/comments","review_comment_url":"https://api.github.com/repos/JabRef/jabref/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JabRef/jabref/issues/1241/comments","statuses_url":"https://api.github.com/repos/JabRef/jabref/statuses/e321c110317f881a692e6670b3d50155b278e975","head":{"label":"tschechlovdev:MsBibExportFormatTest","ref":"MsBibExportFormatTest","sha":"e321c110317f881a692e6670b3d50155b278e975","user":{"login":"tschechlovdev","id":15339876,"avatar_url":"https://avatars.githubusercontent.com/u/15339876?v=3","gravatar_id":"","url":"https://api.github.com/users/tschechlovdev","html_url":"https://github.com/tschechlovdev","followers_url":"https://api.github.com/users/tschechlovdev/followers","following_url":"https://api.github.com/users/tschechlovdev/following{/other_user}","gists_url":"https://api.github.com/users/tschechlovdev/gists{/gist_id}","starred_url":"https://api.github.com/users/tschechlovdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschechlovdev/subscriptions","organizations_url":"https://api.github.com/users/tschechlovdev/orgs","repos_url":"https://api.github.com/users/tschechlovdev/repos","events_url":"https://api.github.com/users/tschechlovdev/events{/privacy}","received_events_url":"https://api.github.com/users/tschechlovdev/received_events","type":"User","site_admin":false},"repo":{"id":46298017,"name":"jabref","full_name":"tschechlovdev/jabref","owner":{"login":"tschechlovdev","id":15339876,"avatar_url":"https://avatars.githubusercontent.com/u/15339876?v=3","gravatar_id":"","url":"https://api.github.com/users/tschechlovdev","html_url":"https://github.com/tschechlovdev","followers_url":"https://api.github.com/users/tschechlovdev/followers","following_url":"https://api.github.com/users/tschechlovdev/following{/other_user}","gists_url":"https://api.github.com/users/tschechlovdev/gists{/gist_id}","starred_url":"https://api.github.com/users/tschechlovdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschechlovdev/subscriptions","organizations_url":"https://api.github.com/users/tschechlovdev/orgs","repos_url":"https://api.github.com/users/tschechlovdev/repos","events_url":"https://api.github.com/users/tschechlovdev/events{/privacy}","received_events_url":"https://api.github.com/users/tschechlovdev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tschechlovdev/jabref","description":"Graphical Java application for managing bibtex (.bib) databases","fork":true,"url":"https://api.github.com/repos/tschechlovdev/jabref","forks_url":"https://api.github.com/repos/tschechlovdev/jabref/forks","keys_url":"https://api.github.com/repos/tschechlovdev/jabref/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tschechlovdev/jabref/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tschechlovdev/jabref/teams","hooks_url":"https://api.github.com/repos/tschechlovdev/jabref/hooks","issue_events_url":"https://api.github.com/repos/tschechlovdev/jabref/issues/events{/number}","events_url":"https://api.github.com/repos/tschechlovdev/jabref/events","assignees_url":"https://api.github.com/repos/tschechlovdev/jabref/assignees{/user}","branches_url":"https://api.github.com/repos/tschechlovdev/jabref/branches{/branch}","tags_url":"https://api.github.com/repos/tschechlovdev/jabref/tags","blobs_url":"https://api.github.com/repos/tschechlovdev/jabref/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tschechlovdev/jabref/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tschechlovdev/jabref/git/refs{/sha}","trees_url":"https://api.github.com/repos/tschechlovdev/jabref/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tschechlovdev/jabref/statuses/{sha}","languages_url":"https://api.github.com/repos/tschechlovdev/jabref/languages","stargazers_url":"https://api.github.com/repos/tschechlovdev/jabref/stargazers","contributors_url":"https://api.github.com/repos/tschechlovdev/jabref/contributors","subscribers_url":"https://api.github.com/repos/tschechlovdev/jabref/subscribers","subscription_url":"https://api.github.com/repos/tschechlovdev/jabref/subscription","commits_url":"https://api.github.com/repos/tschechlovdev/jabref/commits{/sha}","git_commits_url":"https://api.github.com/repos/tschechlovdev/jabref/git/commits{/sha}","comments_url":"https://api.github.com/repos/tschechlovdev/jabref/comments{/number}","issue_comment_url":"https://api.github.com/repos/tschechlovdev/jabref/issues/comments{/number}","contents_url":"https://api.github.com/repos/tschechlovdev/jabref/contents/{+path}","compare_url":"https://api.github.com/repos/tschechlovdev/jabref/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tschechlovdev/jabref/merges","archive_url":"https://api.github.com/repos/tschechlovdev/jabref/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tschechlovdev/jabref/downloads","issues_url":"https://api.github.com/repos/tschechlovdev/jabref/issues{/number}","pulls_url":"https://api.github.com/repos/tschechlovdev/jabref/pulls{/number}","milestones_url":"https://api.github.com/repos/tschechlovdev/jabref/milestones{/number}","notifications_url":"https://api.github.com/repos/tschechlovdev/jabref/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tschechlovdev/jabref/labels{/name}","releases_url":"https://api.github.com/repos/tschechlovdev/jabref/releases{/id}","deployments_url":"https://api.github.com/repos/tschechlovdev/jabref/deployments","created_at":"2015-11-16T19:45:21Z","updated_at":"2016-03-10T11:41:18Z","pushed_at":"2016-05-01T08:41:56Z","git_url":"git://github.com/tschechlovdev/jabref.git","ssh_url":"git@github.com:tschechlovdev/jabref.git","clone_url":"https://github.com/tschechlovdev/jabref.git","svn_url":"https://github.com/tschechlovdev/jabref","homepage":"http://jabref.sourceforge.net/","size":78893,"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":"JabRef:master","ref":"master","sha":"baef2292cf51c31f48e0723f2c8b62dd1abf0eae","user":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars.githubusercontent.com/u/3914421?v=3","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"repo":{"id":17634071,"name":"jabref","full_name":"JabRef/jabref","owner":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars.githubusercontent.com/u/3914421?v=3","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JabRef/jabref","description":"Graphical Java application for managing bibtex (.bib) databases","fork":false,"url":"https://api.github.com/repos/JabRef/jabref","forks_url":"https://api.github.com/repos/JabRef/jabref/forks","keys_url":"https://api.github.com/repos/JabRef/jabref/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JabRef/jabref/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JabRef/jabref/teams","hooks_url":"https://api.github.com/repos/JabRef/jabref/hooks","issue_events_url":"https://api.github.com/repos/JabRef/jabref/issues/events{/number}","events_url":"https://api.github.com/repos/JabRef/jabref/events","assignees_url":"https://api.github.com/repos/JabRef/jabref/assignees{/user}","branches_url":"https://api.github.com/repos/JabRef/jabref/branches{/branch}","tags_url":"https://api.github.com/repos/JabRef/jabref/tags","blobs_url":"https://api.github.com/repos/JabRef/jabref/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JabRef/jabref/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JabRef/jabref/git/refs{/sha}","trees_url":"https://api.github.com/repos/JabRef/jabref/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JabRef/jabref/statuses/{sha}","languages_url":"https://api.github.com/repos/JabRef/jabref/languages","stargazers_url":"https://api.github.com/repos/JabRef/jabref/stargazers","contributors_url":"https://api.github.com/repos/JabRef/jabref/contributors","subscribers_url":"https://api.github.com/repos/JabRef/jabref/subscribers","subscription_url":"https://api.github.com/repos/JabRef/jabref/subscription","commits_url":"https://api.github.com/repos/JabRef/jabref/commits{/sha}","git_commits_url":"https://api.github.com/repos/JabRef/jabref/git/commits{/sha}","comments_url":"https://api.github.com/repos/JabRef/jabref/comments{/number}","issue_comment_url":"https://api.github.com/repos/JabRef/jabref/issues/comments{/number}","contents_url":"https://api.github.com/repos/JabRef/jabref/contents/{+path}","compare_url":"https://api.github.com/repos/JabRef/jabref/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JabRef/jabref/merges","archive_url":"https://api.github.com/repos/JabRef/jabref/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JabRef/jabref/downloads","issues_url":"https://api.github.com/repos/JabRef/jabref/issues{/number}","pulls_url":"https://api.github.com/repos/JabRef/jabref/pulls{/number}","milestones_url":"https://api.github.com/repos/JabRef/jabref/milestones{/number}","notifications_url":"https://api.github.com/repos/JabRef/jabref/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JabRef/jabref/labels{/name}","releases_url":"https://api.github.com/repos/JabRef/jabref/releases{/id}","deployments_url":"https://api.github.com/repos/JabRef/jabref/deployments","created_at":"2014-03-11T14:48:42Z","updated_at":"2016-04-30T10:14:13Z","pushed_at":"2016-05-01T09:58:57Z","git_url":"git://github.com/JabRef/jabref.git","ssh_url":"git@github.com:JabRef/jabref.git","clone_url":"https://github.com/JabRef/jabref.git","svn_url":"https://github.com/JabRef/jabref","homepage":"http://www.jabref.org/","size":83911,"stargazers_count":273,"watchers_count":273,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":211,"mirror_url":null,"open_issues_count":200,"forks":211,"open_issues":200,"watchers":273,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/1241"},"html":{"href":"https://github.com/JabRef/jabref/pull/1241"},"issue":{"href":"https://api.github.com/repos/JabRef/jabref/issues/1241"},"comments":{"href":"https://api.github.com/repos/JabRef/jabref/issues/1241/comments"},"review_comments":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/1241/comments"},"review_comment":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/1241/commits"},"statuses":{"href":"https://api.github.com/repos/JabRef/jabref/statuses/e321c110317f881a692e6670b3d50155b278e975"}}}}