public async Task CanGetProjectsAndThenDefinitionsAsync()
        {
            var client = new TeamServicesClient(new EnvironmentVariableCredentialsService());

            var projects = await client.GetProjectsAsync();
            var project = projects.First();

            var definitions = await client.GetDefinitionsAsync(project);

            Assert.True(definitions.Count > 0);
        }
        public async Task CanGetProjectsAndThenDefinitionsAsync()
        {
            var client = new TeamServicesClient(new EnvironmentVariableCredentialsService());

            var projects = await client.GetProjectsAsync();

            var project = projects.First();

            var definitions = await client.GetDefinitionsAsync(project);

            Assert.True(definitions.Count > 0);
        }
        public async Task CanQueueBuildAsync()
        {
            var client = new TeamServicesClient(new EnvironmentVariableCredentialsService());

            var projects = await client.GetProjectsAsync();
            var project = projects.First();

            var definitions = await client.GetDefinitionsAsync(project);

            var buildRequest = new BuildRequest
            {
                Definition = definitions.First(),
                SourceBranch = "refs/heads/master"
            };

            var build = await client.QueueBuildAsync(project, buildRequest);

            Assert.NotNull(build);
        }
        public async Task CanQueueBuildAsync()
        {
            var client = new TeamServicesClient(new EnvironmentVariableCredentialsService());

            var projects = await client.GetProjectsAsync();

            var project = projects.First();

            var definitions = await client.GetDefinitionsAsync(project);

            var buildRequest = new BuildRequest
            {
                Definition   = definitions.First(),
                SourceBranch = "refs/heads/master"
            };

            var build = await client.QueueBuildAsync(project, buildRequest);

            Assert.NotNull(build);
        }