Get() public method

Gets a single Issue Comment by id.
http://developer.github.com/v3/issues/comments/#get-a-single-comment
public Get ( long repositoryId, int id ) : Task
repositoryId long The Id of the repository
id int The issue comment id
return Task
コード例 #1
0
        public async Task EnsuresNonNullArguments()
        {
            var client = new IssueCommentsClient(Substitute.For<IApiConnection>());

            await AssertEx.Throws<ArgumentNullException>(async () => await client.Get(null, "name", 1));
            await AssertEx.Throws<ArgumentException>(async () => await client.Get("", "name", 1));
            await AssertEx.Throws<ArgumentNullException>(async () => await client.Get("owner", null, 1));
            await AssertEx.Throws<ArgumentException>(async () => await client.Get("owner", "", 1));
        }
コード例 #2
0
        public void RequestsCorrectUrl()
        {
            var connection = Substitute.For<IApiConnection>();
            var client = new IssueCommentsClient(connection);

            client.Get("fake", "repo", 42);

            connection.Received().Get<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments/42"));
        }