Skip to content

Commit

Permalink
Fixed issue 1082 adding enum ItemStateFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
prayankmathur committed Mar 10, 2016
1 parent d03e37b commit 0f5d7c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Octokit.Tests.Integration/Clients/IssuesClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, cl
new IssueUpdate { State = ItemStateFilter.Closed });

var issues = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName,
new RepositoryIssueRequest { State = ItemState.Closed });
new RepositoryIssueRequest { State = ItemStateFilter.Closed });

Assert.Equal(1, issues.Count);
Assert.Equal("A closed issue", issues[0].Title);
Expand Down Expand Up @@ -159,7 +159,7 @@ await _issuesClient.Update(_context.RepositoryOwner, _context.RepositoryName, is
new IssueUpdate { State = ItemStateFilter.Closed });

var retrieved = await _issuesClient.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName,
new RepositoryIssueRequest { State = ItemState.All });
new RepositoryIssueRequest { });

Assert.True(retrieved.Count >= 4);
Assert.True(retrieved.Any(i => i.Number == issue1.Number));
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Tests.Integration/Clients/MilestonesClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ await _github.Issue.Update(_context.RepositoryOwner, _context.RepositoryName, is
new IssueUpdate { State = ItemStateFilter.Closed });

var retrieved = await _github.Issue.GetAllForRepository(_context.RepositoryOwner, _context.RepositoryName,
new RepositoryIssueRequest { State = ItemState.Closed });
new RepositoryIssueRequest { State = ItemStateFilter.Closed });

Assert.True(retrieved.Count >= 2);
Assert.True(retrieved.Any(i => i.Number == issue1.Number));
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Tests/Models/IssueRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void ContainsSetValues()
var request = new IssueRequest
{
Filter = IssueFilter.All,
State = ItemState.Closed,
State = ItemStateFilter.Closed,
SortProperty = IssueSort.Comments,
SortDirection = SortDirection.Ascending,
Since = DateTimeOffset.ParseExact("Wed 23 Jan 2013 8:30 AM -08:00",
Expand Down
4 changes: 2 additions & 2 deletions Octokit/Models/Request/IssueRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class IssueRequest : RequestParameters
public IssueRequest()
{
Filter = IssueFilter.Assigned;
State = ItemState.Open;
State = ItemStateFilter.Open;
Labels = new Collection<string>();
SortProperty = IssueSort.Created;
SortDirection = SortDirection.Descending;
Expand All @@ -38,7 +38,7 @@ public IssueRequest()
/// <value>
/// The state.
/// </value>
public ItemState State { get; set; }
public ItemStateFilter State { get; set; }

/// <summary>
/// Gets the labels to filter by. Add labels to the collection to only request issues with those labels.
Expand Down

0 comments on commit 0f5d7c4

Please sign in to comment.