{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/cli/pulls/comments/76483746","id":76483746,"diff_hunk":"@@ -0,0 +1,34 @@\n+﻿// Copyright (c) .NET Foundation and contributors. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System.IO;\n+using System.Linq;\n+using Microsoft.Extensions.EnvironmentAbstractions;\n+\n+namespace Microsoft.DotNet.Tools.Test\n+{\n+    public class AssemblyTestRunnerResolver : ITestRunnerResolver\n+    {\n+        private readonly string _directoryOfAssemblyUnderTest;\n+\n+        private readonly IDirectory _directory;\n+\n+        public AssemblyTestRunnerResolver(string assemblyUnderTest) :\n+            this(assemblyUnderTest, FileSystemWrapper.Default.Directory)\n+        {\n+        }\n+\n+        internal AssemblyTestRunnerResolver(string assemblyUnderTest, IDirectory directory)\n+        {\n+            _directoryOfAssemblyUnderTest = directory.GetDirectoryFullName(assemblyUnderTest);\n+            _directory = directory;\n+        }\n+\n+        public string ResolveTestRunner()\n+        {\n+            var testRunnerPath = _directory.GetFiles(_directoryOfAssemblyUnderTest, \"dotnet-test-*\").FirstOrDefault();","path":"src/Microsoft.DotNet.Tools.Test/TestRunners/AssemblyTestRunnerResolver.cs","position":29,"original_position":29,"commit_id":"9f2a0169fcdbf474d48840e0a06ea93c980cfed7","original_commit_id":"9f2a0169fcdbf474d48840e0a06ea93c980cfed7","user":{"login":"brthor","id":14280892,"avatar_url":"https://avatars.githubusercontent.com/u/14280892?v=3","gravatar_id":"","url":"https://api.github.com/users/brthor","html_url":"https://github.com/brthor","followers_url":"https://api.github.com/users/brthor/followers","following_url":"https://api.github.com/users/brthor/following{/other_user}","gists_url":"https://api.github.com/users/brthor/gists{/gist_id}","starred_url":"https://api.github.com/users/brthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brthor/subscriptions","organizations_url":"https://api.github.com/users/brthor/orgs","repos_url":"https://api.github.com/users/brthor/repos","events_url":"https://api.github.com/users/brthor/events{/privacy}","received_events_url":"https://api.github.com/users/brthor/received_events","type":"User","site_admin":false},"body":"If this returns default, you may get a null ref on the next call to Path.GetFileNameWithoutExtension","created_at":"2016-08-26T20:33:49Z","updated_at":"2016-08-26T20:33:49Z","html_url":"https://github.com/dotnet/cli/pull/4102#discussion_r76483746","pull_request_url":"https://api.github.com/repos/dotnet/cli/pulls/4102","_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments/76483746"},"html":{"href":"https://github.com/dotnet/cli/pull/4102#discussion_r76483746"},"pull_request":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4102"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/cli/pulls/4102","id":82836956,"html_url":"https://github.com/dotnet/cli/pull/4102","diff_url":"https://github.com/dotnet/cli/pull/4102.diff","patch_url":"https://github.com/dotnet/cli/pull/4102.patch","issue_url":"https://api.github.com/repos/dotnet/cli/issues/4102","number":4102,"state":"open","locked":false,"title":"Adding the capability to run tests against a published dll","user":{"login":"livarcocc","id":367554,"avatar_url":"https://avatars.githubusercontent.com/u/367554?v=3","gravatar_id":"","url":"https://api.github.com/users/livarcocc","html_url":"https://github.com/livarcocc","followers_url":"https://api.github.com/users/livarcocc/followers","following_url":"https://api.github.com/users/livarcocc/following{/other_user}","gists_url":"https://api.github.com/users/livarcocc/gists{/gist_id}","starred_url":"https://api.github.com/users/livarcocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livarcocc/subscriptions","organizations_url":"https://api.github.com/users/livarcocc/orgs","repos_url":"https://api.github.com/users/livarcocc/repos","events_url":"https://api.github.com/users/livarcocc/events{/privacy}","received_events_url":"https://api.github.com/users/livarcocc/received_events","type":"User","site_admin":false},"body":"Added abstractions to resolve the test runner based on different criteria. Before, we only resolved it from the project.json, now we look for a runner in the published directory of the app or use a parameter passed in.\r\n\r\nAlso added a new set of CommandResolvers that resolves a command based on the published directory of the app.\r\n\r\ncc @brthor @eerhardt @piotrpMSFT @Sridhar-MS ","created_at":"2016-08-26T06:16:16Z","updated_at":"2016-08-26T20:33:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"085c3725ccb5dd498b4b2200b72101e4df46bd81","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/cli/pulls/4102/commits","review_comments_url":"https://api.github.com/repos/dotnet/cli/pulls/4102/comments","review_comment_url":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/4102/comments","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/9f2a0169fcdbf474d48840e0a06ea93c980cfed7","head":{"label":"livarcocc:test_without_pj","ref":"test_without_pj","sha":"9f2a0169fcdbf474d48840e0a06ea93c980cfed7","user":{"login":"livarcocc","id":367554,"avatar_url":"https://avatars.githubusercontent.com/u/367554?v=3","gravatar_id":"","url":"https://api.github.com/users/livarcocc","html_url":"https://github.com/livarcocc","followers_url":"https://api.github.com/users/livarcocc/followers","following_url":"https://api.github.com/users/livarcocc/following{/other_user}","gists_url":"https://api.github.com/users/livarcocc/gists{/gist_id}","starred_url":"https://api.github.com/users/livarcocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livarcocc/subscriptions","organizations_url":"https://api.github.com/users/livarcocc/orgs","repos_url":"https://api.github.com/users/livarcocc/repos","events_url":"https://api.github.com/users/livarcocc/events{/privacy}","received_events_url":"https://api.github.com/users/livarcocc/received_events","type":"User","site_admin":false},"repo":{"id":46442514,"name":"cli-1","full_name":"livarcocc/cli-1","owner":{"login":"livarcocc","id":367554,"avatar_url":"https://avatars.githubusercontent.com/u/367554?v=3","gravatar_id":"","url":"https://api.github.com/users/livarcocc","html_url":"https://github.com/livarcocc","followers_url":"https://api.github.com/users/livarcocc/followers","following_url":"https://api.github.com/users/livarcocc/following{/other_user}","gists_url":"https://api.github.com/users/livarcocc/gists{/gist_id}","starred_url":"https://api.github.com/users/livarcocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livarcocc/subscriptions","organizations_url":"https://api.github.com/users/livarcocc/orgs","repos_url":"https://api.github.com/users/livarcocc/repos","events_url":"https://api.github.com/users/livarcocc/events{/privacy}","received_events_url":"https://api.github.com/users/livarcocc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/livarcocc/cli-1","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":true,"url":"https://api.github.com/repos/livarcocc/cli-1","forks_url":"https://api.github.com/repos/livarcocc/cli-1/forks","keys_url":"https://api.github.com/repos/livarcocc/cli-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/livarcocc/cli-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/livarcocc/cli-1/teams","hooks_url":"https://api.github.com/repos/livarcocc/cli-1/hooks","issue_events_url":"https://api.github.com/repos/livarcocc/cli-1/issues/events{/number}","events_url":"https://api.github.com/repos/livarcocc/cli-1/events","assignees_url":"https://api.github.com/repos/livarcocc/cli-1/assignees{/user}","branches_url":"https://api.github.com/repos/livarcocc/cli-1/branches{/branch}","tags_url":"https://api.github.com/repos/livarcocc/cli-1/tags","blobs_url":"https://api.github.com/repos/livarcocc/cli-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/livarcocc/cli-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/livarcocc/cli-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/livarcocc/cli-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/livarcocc/cli-1/statuses/{sha}","languages_url":"https://api.github.com/repos/livarcocc/cli-1/languages","stargazers_url":"https://api.github.com/repos/livarcocc/cli-1/stargazers","contributors_url":"https://api.github.com/repos/livarcocc/cli-1/contributors","subscribers_url":"https://api.github.com/repos/livarcocc/cli-1/subscribers","subscription_url":"https://api.github.com/repos/livarcocc/cli-1/subscription","commits_url":"https://api.github.com/repos/livarcocc/cli-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/livarcocc/cli-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/livarcocc/cli-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/livarcocc/cli-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/livarcocc/cli-1/contents/{+path}","compare_url":"https://api.github.com/repos/livarcocc/cli-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/livarcocc/cli-1/merges","archive_url":"https://api.github.com/repos/livarcocc/cli-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/livarcocc/cli-1/downloads","issues_url":"https://api.github.com/repos/livarcocc/cli-1/issues{/number}","pulls_url":"https://api.github.com/repos/livarcocc/cli-1/pulls{/number}","milestones_url":"https://api.github.com/repos/livarcocc/cli-1/milestones{/number}","notifications_url":"https://api.github.com/repos/livarcocc/cli-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/livarcocc/cli-1/labels{/name}","releases_url":"https://api.github.com/repos/livarcocc/cli-1/releases{/id}","deployments_url":"https://api.github.com/repos/livarcocc/cli-1/deployments","created_at":"2015-11-18T19:36:02Z","updated_at":"2016-01-11T19:05:14Z","pushed_at":"2016-08-26T18:23:58Z","git_url":"git://github.com/livarcocc/cli-1.git","ssh_url":"git@github.com:livarcocc/cli-1.git","clone_url":"https://github.com/livarcocc/cli-1.git","svn_url":"https://github.com/livarcocc/cli-1","homepage":"http://dotnet.github.io/","size":22984,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"dotnet:feature/msbuild","ref":"feature/msbuild","sha":"23da701ceeb3d4a5d7a2d647292a3096d4805217","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":43568107,"name":"cli","full_name":"dotnet/cli","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/cli","description":"This repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).","fork":false,"url":"https://api.github.com/repos/dotnet/cli","forks_url":"https://api.github.com/repos/dotnet/cli/forks","keys_url":"https://api.github.com/repos/dotnet/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/cli/teams","hooks_url":"https://api.github.com/repos/dotnet/cli/hooks","issue_events_url":"https://api.github.com/repos/dotnet/cli/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/cli/events","assignees_url":"https://api.github.com/repos/dotnet/cli/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/cli/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/cli/tags","blobs_url":"https://api.github.com/repos/dotnet/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/cli/languages","stargazers_url":"https://api.github.com/repos/dotnet/cli/stargazers","contributors_url":"https://api.github.com/repos/dotnet/cli/contributors","subscribers_url":"https://api.github.com/repos/dotnet/cli/subscribers","subscription_url":"https://api.github.com/repos/dotnet/cli/subscription","commits_url":"https://api.github.com/repos/dotnet/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/cli/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/cli/merges","archive_url":"https://api.github.com/repos/dotnet/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/cli/downloads","issues_url":"https://api.github.com/repos/dotnet/cli/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/cli/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/cli/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/cli/deployments","created_at":"2015-10-02T18:03:15Z","updated_at":"2016-08-26T17:56:45Z","pushed_at":"2016-08-26T20:28:13Z","git_url":"git://github.com/dotnet/cli.git","ssh_url":"git@github.com:dotnet/cli.git","clone_url":"https://github.com/dotnet/cli.git","svn_url":"https://github.com/dotnet/cli","homepage":"https://docs.microsoft.com/dotnet/ ","size":119373,"stargazers_count":1386,"watchers_count":1386,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":338,"mirror_url":null,"open_issues_count":724,"forks":338,"open_issues":724,"watchers":1386,"default_branch":"rel/1.0.0"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4102"},"html":{"href":"https://github.com/dotnet/cli/pull/4102"},"issue":{"href":"https://api.github.com/repos/dotnet/cli/issues/4102"},"comments":{"href":"https://api.github.com/repos/dotnet/cli/issues/4102/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4102/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/cli/pulls/4102/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/cli/statuses/9f2a0169fcdbf474d48840e0a06ea93c980cfed7"}}}}
{"actor":{"display_login":"brthor"}}