mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 20:45:51 +00:00
Add actual "GetAllForRepository" Activity Feed (#1288)
This commit is contained in:
committed by
Brendan Forster
parent
7bb751c594
commit
7b372253ca
@@ -44,7 +44,7 @@ namespace Octokit.Tests.Reactive
|
||||
|
||||
client.GetAllForRepository("fake", "repo");
|
||||
|
||||
gitHubClient.Connection.Received(1).Get<List<Activity>>(new Uri("repos/fake/repo/issues/events", UriKind.Relative), Args.EmptyDictionary, null);
|
||||
gitHubClient.Connection.Received(1).Get<List<Activity>>(new Uri("repos/fake/repo/events", UriKind.Relative), Args.EmptyDictionary, null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -60,6 +60,32 @@ namespace Octokit.Tests.Reactive
|
||||
}
|
||||
}
|
||||
|
||||
public class TheGetAllIssuesForRepositoryMethod
|
||||
{
|
||||
[Fact]
|
||||
public void RequestsCorrectUrl()
|
||||
{
|
||||
var gitHubClient = Substitute.For<IGitHubClient>();
|
||||
var client = new ObservableEventsClient(gitHubClient);
|
||||
|
||||
client.GetAllIssuesForRepository("fake", "repo");
|
||||
|
||||
gitHubClient.Connection.Received(1).Get<List<Activity>>(new Uri("repos/fake/repo/issues/events", UriKind.Relative), Args.EmptyDictionary, null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EnsuresArgumentsNotNull()
|
||||
{
|
||||
var gitHubClient = Substitute.For<IGitHubClient>();
|
||||
var client = new ObservableEventsClient(gitHubClient);
|
||||
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllIssuesForRepository(null, "name").ToTask());
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllIssuesForRepository("", "name").ToTask());
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllIssuesForRepository("owner", null).ToTask());
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllIssuesForRepository("owner", "").ToTask());
|
||||
}
|
||||
}
|
||||
|
||||
public class TheGetAllForRepositoryNetworkMethod
|
||||
{
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user