public async Task Find_ValidParameters_SetsCorrectResourceAndMethod()
        {
            var sut = new CommitRepository(_requestFactory);

            await sut.Find(0, "commitSha");

            _requestFactory.Received().Create("projects/{projectId}/repository/commits/{commitSha}", Method.Get);
        }
        public async Task Find_ValidParameters_AddsCommitShaUrlSegment()
        {
            const string expected = "commitSha";
            var          sut      = new CommitRepository(_requestFactory);

            await sut.Find(0, expected);

            _request.Received().AddUrlSegment("commitSha", expected);
        }
        public async Task Find_ValidParameters_AddsProjectIdUrlSegment()
        {
            const uint expected = 0;
            var        sut      = new CommitRepository(_requestFactory);

            await sut.Find(expected, "commitSha");

            _request.Received().AddUrlSegment("projectId", expected);
        }
        public async Task Find_CommitShaIsNull_ThrowsArgumentNullException()
        {
            var sut = new CommitRepository(_requestFactory);

            await Assert.ThrowsAsync <ArgumentNullException>(() => sut.Find(0, null));
        }