mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 03:55:55 +00:00
Add tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Reactive.Linq;
|
||||
using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Reactive;
|
||||
using Xunit;
|
||||
@@ -27,5 +28,26 @@ namespace Octokit.Tests.Integration
|
||||
Assert.False(repository2.Fork);
|
||||
}
|
||||
}
|
||||
|
||||
public class TheGetAllPublicSinceMethod
|
||||
{
|
||||
[IntegrationTest]
|
||||
public async Task ReturnsAllPublicReposSinceLastSeen()
|
||||
{
|
||||
var github = Helper.GetAuthenticatedClient();
|
||||
|
||||
var client = new ObservableRepositoriesClient(github);
|
||||
var request = new PublicRepositoryRequest
|
||||
{
|
||||
Since = 32732250
|
||||
};
|
||||
var repositories = await client.GetAllPublic(request).ToArray();
|
||||
Assert.NotNull(repositories);
|
||||
Assert.True(repositories.Any());
|
||||
Assert.Equal(32732252, repositories[0].Id);
|
||||
Assert.False(repositories[0].Private);
|
||||
Assert.Equal("zad19", repositories[0].Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user