Exemplo n.º 1
0
        public void EnumerateIssues_ExistingPublicRepositoryWithIssue_ReturnValidInfo()
        {
            var issues = ExistingRepository.EnumerateIssues().ToList();

            issues.ShouldNotBeNull();
            issues.Count.ShouldBe(2, "Only two issues are known on BotTestRepository");
        }
Exemplo n.º 2
0
        public async Task EnumerateIssuesAsync_ExistingPublicRepositoryWithIssue_ReturnValidInfo()
        {
            var issues = await ExistingRepository.EnumerateIssuesAsync().ToListAsync();

            issues.ShouldNotBeNull();
            issues.Count.ShouldBe(2, "Only two issues are known on BotTestRepository");
        }
        public void EnumeratePullRequests_ExistingPublicRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequests = ExistingRepository.EnumeratePullRequests();

            pullRequests.ShouldNotBeNull();
            pullRequests.Count().ShouldBe(1, "Only one opened pull request is known on Mercurial repository");
        }
        public void EnumeratePullRequestsActivities_ExistingPublicRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequestActivities = ExistingRepository.EnumeratePullRequestsActivities();

            pullRequestActivities.ShouldNotBeNull();
            pullRequestActivities.Count().ShouldBeGreaterThanOrEqualTo(6);
        }
        public async Task EnumeratePullRequestsActivitiesAsync_ExistingPublicRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequestActivities = ExistingRepository.EnumeratePullRequestsActivitiesAsync();

            pullRequestActivities.ShouldNotBeNull();
            (await pullRequestActivities.CountAsync()).ShouldBeGreaterThanOrEqualTo(6);
        }
        public void GetPullRequestsActivities_ExistingPublicRepositoryWithPullRequest_WithMaxLimit_ReturnValidInfo()
        {
            var pullRequestActivities = ExistingRepository.GetPullRequestsActivities(3);

            pullRequestActivities.ShouldNotBeNull();
            pullRequestActivities.Count.ShouldBe(3);
        }
Exemplo n.º 7
0
        public void EnumeratePullRequests_ExistingRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequests = ExistingRepository.EnumeratePullRequests().ToList();

            pullRequests.Any(p => p.id == OpenedPullRequestId).ShouldBe(true);
            pullRequests.Any(p => p.id == DeclinedPullRequestId).ShouldBe(false);
        }
Exemplo n.º 8
0
        public async Task EnumeratePullRequestsAsync_ExistingRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequests = await ExistingRepository.EnumeratePullRequestsAsync().ToListAsync();

            pullRequests.Any(p => p.id == OpenedPullRequestId).ShouldBe(true);
            pullRequests.Any(p => p.id == DeclinedPullRequestId).ShouldBe(false);
        }
        public async Task EnumeratePullRequestsAsync_ExistingPublicRepositoryWithPullRequest_ReturnValidInfo()
        {
            var pullRequests = ExistingRepository.EnumeratePullRequestsAsync();

            pullRequests.ShouldNotBeNull();
            (await pullRequests.ToListAsync()).Count
            .ShouldBe(1, "Only one opened pull request is known on Mercurial repository");
        }
Exemplo n.º 10
0
        public async Task EnumerateIssuesAsync_ExistingPublicRepositoryWithIssue_OnlyOpen_ReturnValidInfo()
        {
            var parameters = new EnumerateParameters {
                Filter = "state=\"open\""
            };
            var issues = await ExistingRepository.EnumerateIssuesAsync(parameters).ToListAsync();

            issues.ShouldNotBeNull();
            issues.Count.ShouldBe(1, "Only one open issue is known on BotTestRepository");
        }
Exemplo n.º 11
0
        public void ListIssues_ExistingPublicRepositoryWithIssue_OnlyOpen_ReturnValidInfo()
        {
            var parameters = new ListParameters {
                Filter = "state=\"open\""
            };
            var issues = ExistingRepository.ListIssues(parameters);

            issues.ShouldNotBeNull();
            issues.Count.ShouldBe(1, "Only one open issue is known on BotTestRepository");
        }
        public void EnumeratePullRequests_ExistingPublicRepositoryWithPullRequest_AllStates_ReturnValidInfo()
        {
            var parameters = new EnumeratePullRequestsParameters
            {
                States = new[] { PullRequestState.Open, PullRequestState.Merged, PullRequestState.Declined, PullRequestState.Superseded }
            };
            var pullRequests = ExistingRepository.EnumeratePullRequests(parameters);

            pullRequests.ShouldNotBeNull();
            pullRequests.Count().ShouldBeGreaterThan(1, "When we don't limit to open pull request we can found more!");
        }
Exemplo n.º 13
0
        public void EnumeratePullRequests_ExistingRepositoryWithPullRequest_AllStates_ReturnValidInfo()
        {
            var parameters = new EnumeratePullRequestsParameters
            {
                States = new[] { PullRequestState.Open, PullRequestState.Merged, PullRequestState.Declined, PullRequestState.Superseded }
            };
            var pullRequests = ExistingRepository.EnumeratePullRequests(parameters).ToList();

            pullRequests.Any(p => p.id == OpenedPullRequestId).ShouldBe(true);
            pullRequests.Any(p => p.id == DeclinedPullRequestId).ShouldBe(true);
        }
 public ViewResult Currentuser(loginPortal login)
 {
     if (ModelState.IsValid)
     {
         ExistingRepository.AddResponse(login);
         return(View("Thanks2", login));
     }
     else
     {
         //there is a validation error
         return(View());
     }
 }