private IEnumerable<Build> GetApplicationBuilds(string accessToken, string slug)
        {
            var builds = new List<Build>();

            using (var httpClient = new HttpClient())
            {
                httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BEARER", accessToken);
                var response = httpClient.GetAsync(string.Format("https://appharbor.com/applications/{0}/builds", slug)).Result;
                var responseBody = response.Content.ReadAsStringAsync().Result;
                var json = JsonConvert.DeserializeObject(responseBody) as dynamic;
                var buildArray = json as IEnumerable<dynamic>;

                foreach (var buildItem in buildArray)
                {
                    var build = new Build();
                    build.Status = buildItem.status.Value;
                    build.Created = buildItem.created.Value;
                    build.Deployed = buildItem.deployed.Value;
                    build.CommitId = buildItem.commit.id.Value;
                    build.CommitMessage = buildItem.commit.message.Value;
                    build.DownloadUrl = buildItem.download_url.Value;
                    build.TestsUrl = buildItem.tests_url.Value;
                    build.Url = buildItem.url.Value;
                    builds.Add(build);
                }
            }

            return builds;
        }
            public void WhenStatusIsNull_ShouldReturnFalse()
            {
                var build = new Build();

                var actual = build.IsSuccessful();

                Assert.Equal(false, actual);
            }
            public void WhenStatusIsSucceeded_ShouldReturnTrue()
            {
                var build = new Build();
                build.Status = "succeeded";

                var actual = build.IsSuccessful();

                Assert.Equal(true, actual);
            }
            public void WhenStatusIsSucceededWithMixedCase_ShouldReturnTrue()
            {
                var build = new Build();
                build.Status = "SuCcEeDeD";

                var actual = build.IsSuccessful();

                Assert.Equal(true, actual);
            }
            public void WhenStatusIsNotSucceeded_ShouldReturnFalse()
            {
                var build = new Build();
                build.Status = "status";

                var actual = build.IsSuccessful();

                Assert.Equal(false, actual);
            }
            public void WhenParameterless_ShouldDefaultTo()
            {
                var build = new Build();

                Assert.Equal(null, build.CommitId);
                Assert.Equal(null, build.CommitMessage);
                Assert.Equal(null, build.Created);
                Assert.Equal(null, build.Deployed);
                Assert.Equal(null, build.DownloadUrl);
                Assert.Equal(null, build.Status);
                Assert.Equal(null, build.TestsUrl);
                Assert.Equal(null, build.Url);
            }