{"action":"created","comment":{"url":"https://api.github.com/repos/nunit/nunit/pulls/comments/198591547","pull_request_review_id":132548494,"id":198591547,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODU5MTU0Nw==","diff_hunk":"@@ -81,42 +81,46 @@ public ITest Build(Assembly assembly, IDictionary<string, object> options)\n #endif\n \n             string assemblyPath = AssemblyHelper.GetAssemblyPath(assembly);\n-            return Build(assembly, assemblyPath, options);\n+            string assemblyName = assemblyPath.IndexOfAny(Path.GetInvalidPathChars()) == -1\n+                ? Path.GetFileName(assemblyPath)\n+                : AssemblyHelper.GetAssemblyName(assembly).FullName;\n+\n+            return Build(assembly, assemblyName, options);\n         }\n \n         /// <summary>\n         /// Build a suite of tests given the filename of an assembly\n         /// </summary>\n-        /// <param name=\"assemblyName\">The filename of the assembly from which tests are to be built</param>\n+        /// <param name=\"assemblyNameOrPath\">The filename or path of the assembly from which tests are to be built</param>\n         /// <param name=\"options\">A dictionary of options to use in building the suite</param>\n         /// <returns>\n         /// A TestSuite containing the tests found in the assembly\n         /// </returns>\n-        public ITest Build(string assemblyName, IDictionary<string, object> options)\n+        public ITest Build(string assemblyNameOrPath, IDictionary<string, object> options)\n         {\n #if NETSTANDARD1_4\n-            log.Debug(\"Loading {0}\", assemblyName);\n+            log.Debug(\"Loading {0}\", assemblyNameOrPath);\n #else\n-            log.Debug(\"Loading {0} in AppDomain {1}\", assemblyName, AppDomain.CurrentDomain.FriendlyName);\n+            log.Debug(\"Loading {0} in AppDomain {1}\", assemblyNameOrPath, AppDomain.CurrentDomain.FriendlyName);\n #endif\n \n             TestSuite testAssembly = null;\n \n             try\n             {\n-                var assembly = AssemblyHelper.Load(assemblyName);\n-                testAssembly = Build(assembly, assemblyName, options);\n+                var assembly = AssemblyHelper.Load(assemblyNameOrPath);\n+                testAssembly = Build(assembly, Path.GetFileName(assemblyNameOrPath), options);\n             }\n             catch (Exception ex)\n             {\n-                testAssembly = new TestAssembly(assemblyName);\n+                testAssembly = new TestAssembly(Path.GetFileName(assemblyNameOrPath));\n                 testAssembly.MakeInvalid(ExceptionHelper.BuildMessage(ex, true));\n             }\n \n             return testAssembly;\n         }\n \n-        private TestSuite Build(Assembly assembly, string assemblyPath, IDictionary<string, object> options)\n+        private TestSuite Build(Assembly assembly, string assemblyName, IDictionary<string, object> options)","path":"src/NUnitFramework/framework/Api/DefaultTestAssemblyBuilder.cs","position":52,"original_position":52,"commit_id":"249cde07440413585371d6b9b3fb9dbb0af3c509","original_commit_id":"249cde07440413585371d6b9b3fb9dbb0af3c509","user":{"login":"jnm2","id":8040367,"node_id":"MDQ6VXNlcjgwNDAzNjc=","avatar_url":"https://avatars2.githubusercontent.com/u/8040367?v=4","gravatar_id":"","url":"https://api.github.com/users/jnm2","html_url":"https://github.com/jnm2","followers_url":"https://api.github.com/users/jnm2/followers","following_url":"https://api.github.com/users/jnm2/following{/other_user}","gists_url":"https://api.github.com/users/jnm2/gists{/gist_id}","starred_url":"https://api.github.com/users/jnm2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnm2/subscriptions","organizations_url":"https://api.github.com/users/jnm2/orgs","repos_url":"https://api.github.com/users/jnm2/repos","events_url":"https://api.github.com/users/jnm2/events{/privacy}","received_events_url":"https://api.github.com/users/jnm2/received_events","type":"User","site_admin":false},"body":"I'm thinking this would be most clear as `string suiteName`, and `suiteName` should also be the name of the `BuildTestAssembly` parameter.","created_at":"2018-06-27T18:10:48Z","updated_at":"2018-06-27T18:10:49Z","html_url":"https://github.com/nunit/nunit/pull/2913#discussion_r198591547","pull_request_url":"https://api.github.com/repos/nunit/nunit/pulls/2913","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments/198591547"},"html":{"href":"https://github.com/nunit/nunit/pull/2913#discussion_r198591547"},"pull_request":{"href":"https://api.github.com/repos/nunit/nunit/pulls/2913"}}},"pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/2913","id":197593476,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTkzNDc2","html_url":"https://github.com/nunit/nunit/pull/2913","diff_url":"https://github.com/nunit/nunit/pull/2913.diff","patch_url":"https://github.com/nunit/nunit/pull/2913.patch","issue_url":"https://api.github.com/repos/nunit/nunit/issues/2913","number":2913,"state":"open","locked":false,"title":"Change TestAssembly to only take in assembly name, clean up the usage of path and name","user":{"login":"jrjrguo","id":27794646,"node_id":"MDQ6VXNlcjI3Nzk0NjQ2","avatar_url":"https://avatars0.githubusercontent.com/u/27794646?v=4","gravatar_id":"","url":"https://api.github.com/users/jrjrguo","html_url":"https://github.com/jrjrguo","followers_url":"https://api.github.com/users/jrjrguo/followers","following_url":"https://api.github.com/users/jrjrguo/following{/other_user}","gists_url":"https://api.github.com/users/jrjrguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjrguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjrguo/subscriptions","organizations_url":"https://api.github.com/users/jrjrguo/orgs","repos_url":"https://api.github.com/users/jrjrguo/repos","events_url":"https://api.github.com/users/jrjrguo/events{/privacy}","received_events_url":"https://api.github.com/users/jrjrguo/received_events","type":"User","site_admin":false},"body":"The motivation of this change is to fix [issue 2898](https://github.com/nunit/nunit/issues/2898). The assemblyPath of an assembly might be <unknown> when running uwp tests. The fix is to use the assemblyName instead in those cases.\r\nThe main improvement is to TestAssembly so that it only takes in assembly name, since that's the only thing it actually uses. It was a bit misleading before, which is probably why assemblyPath and assemblyName are a little misused in multiple classes. Now the caller should only pass in name to TestAssembly.","created_at":"2018-06-27T01:29:02Z","updated_at":"2018-06-27T18:10:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27aad54abbdc6d83f523fc7b9c7236443ca6b223","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nunit/nunit/pulls/2913/commits","review_comments_url":"https://api.github.com/repos/nunit/nunit/pulls/2913/comments","review_comment_url":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/2913/comments","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/249cde07440413585371d6b9b3fb9dbb0af3c509","head":{"label":"jrjrguo:jr/unknownAssemblyPath","ref":"jr/unknownAssemblyPath","sha":"249cde07440413585371d6b9b3fb9dbb0af3c509","user":{"login":"jrjrguo","id":27794646,"node_id":"MDQ6VXNlcjI3Nzk0NjQ2","avatar_url":"https://avatars0.githubusercontent.com/u/27794646?v=4","gravatar_id":"","url":"https://api.github.com/users/jrjrguo","html_url":"https://github.com/jrjrguo","followers_url":"https://api.github.com/users/jrjrguo/followers","following_url":"https://api.github.com/users/jrjrguo/following{/other_user}","gists_url":"https://api.github.com/users/jrjrguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjrguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjrguo/subscriptions","organizations_url":"https://api.github.com/users/jrjrguo/orgs","repos_url":"https://api.github.com/users/jrjrguo/repos","events_url":"https://api.github.com/users/jrjrguo/events{/privacy}","received_events_url":"https://api.github.com/users/jrjrguo/received_events","type":"User","site_admin":false},"repo":{"id":138811398,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg4MTEzOTg=","name":"nunit","full_name":"jrjrguo/nunit","owner":{"login":"jrjrguo","id":27794646,"node_id":"MDQ6VXNlcjI3Nzk0NjQ2","avatar_url":"https://avatars0.githubusercontent.com/u/27794646?v=4","gravatar_id":"","url":"https://api.github.com/users/jrjrguo","html_url":"https://github.com/jrjrguo","followers_url":"https://api.github.com/users/jrjrguo/followers","following_url":"https://api.github.com/users/jrjrguo/following{/other_user}","gists_url":"https://api.github.com/users/jrjrguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjrguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjrguo/subscriptions","organizations_url":"https://api.github.com/users/jrjrguo/orgs","repos_url":"https://api.github.com/users/jrjrguo/repos","events_url":"https://api.github.com/users/jrjrguo/events{/privacy}","received_events_url":"https://api.github.com/users/jrjrguo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrjrguo/nunit","description":"NUnit 3.0 Framework","fork":true,"url":"https://api.github.com/repos/jrjrguo/nunit","forks_url":"https://api.github.com/repos/jrjrguo/nunit/forks","keys_url":"https://api.github.com/repos/jrjrguo/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrjrguo/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrjrguo/nunit/teams","hooks_url":"https://api.github.com/repos/jrjrguo/nunit/hooks","issue_events_url":"https://api.github.com/repos/jrjrguo/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/jrjrguo/nunit/events","assignees_url":"https://api.github.com/repos/jrjrguo/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/jrjrguo/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/jrjrguo/nunit/tags","blobs_url":"https://api.github.com/repos/jrjrguo/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrjrguo/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrjrguo/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrjrguo/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrjrguo/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/jrjrguo/nunit/languages","stargazers_url":"https://api.github.com/repos/jrjrguo/nunit/stargazers","contributors_url":"https://api.github.com/repos/jrjrguo/nunit/contributors","subscribers_url":"https://api.github.com/repos/jrjrguo/nunit/subscribers","subscription_url":"https://api.github.com/repos/jrjrguo/nunit/subscription","commits_url":"https://api.github.com/repos/jrjrguo/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrjrguo/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrjrguo/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrjrguo/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrjrguo/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/jrjrguo/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrjrguo/nunit/merges","archive_url":"https://api.github.com/repos/jrjrguo/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrjrguo/nunit/downloads","issues_url":"https://api.github.com/repos/jrjrguo/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/jrjrguo/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/jrjrguo/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/jrjrguo/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrjrguo/nunit/labels{/name}","releases_url":"https://api.github.com/repos/jrjrguo/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/jrjrguo/nunit/deployments","created_at":"2018-06-27T01:04:20Z","updated_at":"2018-06-27T01:04:25Z","pushed_at":"2018-06-27T01:14:16Z","git_url":"git://github.com/jrjrguo/nunit.git","ssh_url":"git@github.com:jrjrguo/nunit.git","clone_url":"https://github.com/jrjrguo/nunit.git","svn_url":"https://github.com/jrjrguo/nunit","homepage":"http://www.nunit.org/","size":34471,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nunit:master","ref":"master","sha":"98cc4df2f053fa21bb359d5a012aa24a609a7581","user":{"login":"nunit","id":2678858,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2Nzg4NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2678858?v=4","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"repo":{"id":13692183,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5MjE4Mw==","name":"nunit","full_name":"nunit/nunit","owner":{"login":"nunit","id":2678858,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2Nzg4NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2678858?v=4","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nunit/nunit","description":"NUnit 3.0 Framework","fork":false,"url":"https://api.github.com/repos/nunit/nunit","forks_url":"https://api.github.com/repos/nunit/nunit/forks","keys_url":"https://api.github.com/repos/nunit/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nunit/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nunit/nunit/teams","hooks_url":"https://api.github.com/repos/nunit/nunit/hooks","issue_events_url":"https://api.github.com/repos/nunit/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/nunit/nunit/events","assignees_url":"https://api.github.com/repos/nunit/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/nunit/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/nunit/nunit/tags","blobs_url":"https://api.github.com/repos/nunit/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nunit/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nunit/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nunit/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/nunit/nunit/languages","stargazers_url":"https://api.github.com/repos/nunit/nunit/stargazers","contributors_url":"https://api.github.com/repos/nunit/nunit/contributors","subscribers_url":"https://api.github.com/repos/nunit/nunit/subscribers","subscription_url":"https://api.github.com/repos/nunit/nunit/subscription","commits_url":"https://api.github.com/repos/nunit/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nunit/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nunit/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nunit/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nunit/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/nunit/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nunit/nunit/merges","archive_url":"https://api.github.com/repos/nunit/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nunit/nunit/downloads","issues_url":"https://api.github.com/repos/nunit/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/nunit/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/nunit/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/nunit/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nunit/nunit/labels{/name}","releases_url":"https://api.github.com/repos/nunit/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/nunit/nunit/deployments","created_at":"2013-10-18T23:43:29Z","updated_at":"2018-06-26T14:57:19Z","pushed_at":"2018-06-27T01:29:03Z","git_url":"git://github.com/nunit/nunit.git","ssh_url":"git@github.com:nunit/nunit.git","clone_url":"https://github.com/nunit/nunit.git","svn_url":"https://github.com/nunit/nunit","homepage":"http://www.nunit.org/","size":34469,"stargazers_count":1333,"watchers_count":1333,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":486,"mirror_url":null,"archived":false,"open_issues_count":302,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":486,"open_issues":302,"watchers":1333,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/2913"},"html":{"href":"https://github.com/nunit/nunit/pull/2913"},"issue":{"href":"https://api.github.com/repos/nunit/nunit/issues/2913"},"comments":{"href":"https://api.github.com/repos/nunit/nunit/issues/2913/comments"},"review_comments":{"href":"https://api.github.com/repos/nunit/nunit/pulls/2913/comments"},"review_comment":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nunit/nunit/pulls/2913/commits"},"statuses":{"href":"https://api.github.com/repos/nunit/nunit/statuses/249cde07440413585371d6b9b3fb9dbb0af3c509"}},"author_association":"NONE"}}
{"actor":{"display_login":"jnm2"}}