public async Task WhenThePullRequestIsAMatch_AndNoBuildIsPending_ThenABuildIsQueued()
        {
            _tfsService
            .ArePendingBuilds(ProjectName, BuildDefinitionName)
            .Returns(false);

            var pullRequest = GetPullRequestUpdatePayload(
                "repo-test",
                "master",
                "completed");

            await _sut.Handle(pullRequest);

            await _tfsService
            .Received()
            .QueueNewBuild(ProjectName, BuildDefinitionName);
        }
        public async Task Handle(GitPullRequestUpdatedPayload pullRequest)
        {
            if (_pullRequestMatcher.IsMatch(pullRequest))
            {
                Log.Information("Pull request matches, checking for pending builds for {BuildDefinitionName} on project {ProjectName}", _buildDefinitionName, _projectName);
                if (await _tfsService.ArePendingBuilds(_projectName, _buildDefinitionName))
                {
                    Log.Information("Found pending build(s), not queuing another one");
                }
                else
                {
                    Log.Information("No build(s) pending, queuing another one");
                    await _tfsService.QueueNewBuild(_projectName, _buildDefinitionName);

                    Log.Information("New build successfully queued");
                }
            }
        }