diff --git a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs index 73284093..adb7814c 100644 --- a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs @@ -55,7 +55,7 @@ public class IssuesClientTests : IDisposable finally { var closed = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, - new IssueUpdate { State = ItemState.Closed }) + new IssueUpdate { State = ItemStateFilter.Closed }) .Result; Assert.NotNull(closed); } @@ -75,7 +75,7 @@ public class IssuesClientTests : IDisposable await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue3); var closed = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue4); await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, closed.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); var issues = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName); @@ -99,7 +99,7 @@ public class IssuesClientTests : IDisposable await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue3); var closed = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue4); await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, closed.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); var issues = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName, new RepositoryIssueRequest { SortDirection = SortDirection.Ascending }); @@ -119,7 +119,7 @@ public class IssuesClientTests : IDisposable await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue2); var closed = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue2); await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, closed.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); var issues = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName, new RepositoryIssueRequest { State = ItemState.Closed }); @@ -156,7 +156,7 @@ public class IssuesClientTests : IDisposable var issue3 = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue3); var issue4 = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue4); await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue4.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); var retrieved = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName, new RepositoryIssueRequest { State = ItemState.All }); diff --git a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs index 61f9c919..de362c0b 100644 --- a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs @@ -33,7 +33,7 @@ public class IssuesEventsClientTests : IDisposable var issueEventInfo = await _issuesEventsClient.GetAllForIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); Assert.Empty(issueEventInfo); - var closed = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemState.Closed }) + var closed = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemStateFilter.Closed }) .Result; Assert.NotNull(closed); issueEventInfo = await _issuesEventsClient.GetAllForIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); @@ -55,15 +55,15 @@ public class IssuesEventsClientTests : IDisposable Thread.Sleep(1000); // close and open issue1 - var closed1 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue1.Number, new IssueUpdate { State = ItemState.Closed }) + var closed1 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue1.Number, new IssueUpdate { State = ItemStateFilter.Closed }) .Result; Assert.NotNull(closed1); - var reopened1 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue1.Number, new IssueUpdate { State = ItemState.Open }) + var reopened1 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue1.Number, new IssueUpdate { State = ItemStateFilter.Open }) .Result; Assert.NotNull(reopened1); // close issue2 - var closed2 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue2.Number, new IssueUpdate { State = ItemState.Closed }) + var closed2 = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue2.Number, new IssueUpdate { State = ItemStateFilter.Closed }) .Result; Assert.NotNull(closed2); @@ -78,7 +78,7 @@ public class IssuesEventsClientTests : IDisposable { var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); - var closed = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemState.Closed }) + var closed = _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new IssueUpdate { State = ItemStateFilter.Closed }) .Result; Assert.NotNull(closed); var issueEvents = await _issuesEventsClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName); diff --git a/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs b/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs index f5a58f4a..9a241243 100644 --- a/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs @@ -46,7 +46,7 @@ public class MilestonesClientTests : IDisposable { var milestone1 = new NewMilestone("milestone 1") { DueOn = DateTime.Now }; var milestone2 = new NewMilestone("milestone 2") { DueOn = DateTime.Now.AddDays(1) }; - var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemState.Closed }; + var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemStateFilter.Closed }; await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone1); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone2); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone3); @@ -62,7 +62,7 @@ public class MilestonesClientTests : IDisposable { var milestone1 = new NewMilestone("milestone 1") { DueOn = DateTime.Now }; var milestone2 = new NewMilestone("milestone 2") { DueOn = DateTime.Now.AddDays(1) }; - var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemState.Closed }; + var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemStateFilter.Closed }; await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone1); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone2); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone3); @@ -79,7 +79,7 @@ public class MilestonesClientTests : IDisposable { var milestone1 = new NewMilestone("milestone 1") { DueOn = DateTime.Now }; var milestone2 = new NewMilestone("milestone 2") { DueOn = DateTime.Now.AddDays(1) }; - var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemState.Closed }; + var milestone3 = new NewMilestone("milestone 3") { DueOn = DateTime.Now.AddDays(3), State = ItemStateFilter.Closed }; await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone1); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone2); await _milestonesClient.Create(_context.RepositoryOwner, _context.RepositoryName, milestone3); @@ -98,9 +98,9 @@ public class MilestonesClientTests : IDisposable var issue1 = await _github.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); var issue2 = await _github.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); await _github.Issue.Update(_context.RepositoryOwner, _context.RepositoryName, issue1.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); await _github.Issue.Update(_context.RepositoryOwner, _context.RepositoryName, issue2.Number, - new IssueUpdate { State = ItemState.Closed }); + new IssueUpdate { State = ItemStateFilter.Closed }); var retrieved = await _github.Issue.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName, new RepositoryIssueRequest { State = ItemState.Closed }); diff --git a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs index 63af12a5..8543469f 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs @@ -104,7 +104,7 @@ public class PullRequestsClientTests : IDisposable var newPullRequest = new NewPullRequest("a pull request", branchName, "master"); var pullRequest = await _fixture.Create(Helper.UserName, _context.RepositoryName, newPullRequest); - var updatePullRequest = new PullRequestUpdate { State = ItemState.Closed }; + var updatePullRequest = new PullRequestUpdate { State = ItemStateFilter.Closed }; var result = await _fixture.Update(Helper.UserName, _context.RepositoryName, pullRequest.Number, updatePullRequest); Assert.Equal(ItemState.Closed, result.State); @@ -120,7 +120,7 @@ public class PullRequestsClientTests : IDisposable var newPullRequest = new NewPullRequest("a pull request", branchName, "master"); var pullRequest = await _fixture.Create(Helper.UserName, _context.RepositoryName, newPullRequest); - var updatePullRequest = new PullRequestUpdate { State = ItemState.Closed }; + var updatePullRequest = new PullRequestUpdate { State = ItemStateFilter.Closed }; await _fixture.Update(Helper.UserName, _context.RepositoryName, pullRequest.Number, updatePullRequest); var closedPullRequests = new PullRequestRequest { State = ItemState.Closed }; diff --git a/Octokit.Tests.Integration/Clients/SearchClientTests.cs b/Octokit.Tests.Integration/Clients/SearchClientTests.cs index 78da8769..cae762dd 100644 --- a/Octokit.Tests.Integration/Clients/SearchClientTests.cs +++ b/Octokit.Tests.Integration/Clients/SearchClientTests.cs @@ -79,7 +79,7 @@ public class SearchClientTests { var request = new SearchIssuesRequest("phone"); request.Repos.Add("caliburn-micro", "caliburn.micro"); - request.State = ItemState.Open; + request.State = ItemStateFilter.Open; var issues = await _gitHubClient.Search.SearchIssues(request); @@ -91,7 +91,6 @@ public class SearchClientTests { var request = new SearchIssuesRequest("phone"); request.Repos.Add("caliburn-micro", "caliburn.micro"); - request.State = ItemState.All; var issues = await _gitHubClient.Search.SearchIssues(request); diff --git a/Octokit.Tests.Integration/RedirectTests.cs b/Octokit.Tests.Integration/RedirectTests.cs index b61416c2..a620c453 100644 --- a/Octokit.Tests.Integration/RedirectTests.cs +++ b/Octokit.Tests.Integration/RedirectTests.cs @@ -38,7 +38,7 @@ namespace Octokit.Tests.Integration Assert.NotNull(resolvedIssue); var update = resolvedIssue.ToUpdate(); - update.State = ItemState.Closed; + update.State = ItemStateFilter.Closed; await client.Issue.Update(owner, oldRepoName, issue.Number, update); } } diff --git a/Octokit.Tests/Clients/SearchClientTests.cs b/Octokit.Tests/Clients/SearchClientTests.cs index 4d5125d5..ba79d5ea 100644 --- a/Octokit.Tests/Clients/SearchClientTests.cs +++ b/Octokit.Tests/Clients/SearchClientTests.cs @@ -902,7 +902,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new SearchClient(connection); var request = new SearchIssuesRequest("something"); - request.State = ItemState.Open; + request.State = ItemStateFilter.Open; client.SearchIssues(request); @@ -917,7 +917,7 @@ namespace Octokit.Tests.Clients var connection = Substitute.For(); var client = new SearchClient(connection); var request = new SearchIssuesRequest("something"); - request.State = ItemState.Closed; + request.State = ItemStateFilter.Closed; client.SearchIssues(request);