mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 14:15:12 +00:00
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System.Reactive.Linq;
|
|
using System.Threading.Tasks;
|
|
using Octokit.Reactive;
|
|
using Xunit;
|
|
|
|
namespace Octokit.Tests.Integration
|
|
{
|
|
public class ObservableRepositoriesClientTests
|
|
{
|
|
public class TheGetMethod
|
|
{
|
|
[IntegrationTest]
|
|
public async Task ReturnsSpecifiedRepository()
|
|
{
|
|
var github = new GitHubClient("Octokit Test Runner")
|
|
{
|
|
Credentials = Helper.Credentials
|
|
};
|
|
var client = new ObservableRepositoriesClient(github);
|
|
var observable = client.Get("haacked", "seegit");
|
|
var repository = await observable;
|
|
var repository2 = await observable;
|
|
|
|
Assert.Equal("https://github.com/Haacked/SeeGit.git", repository.CloneUrl);
|
|
Assert.False(repository.Private);
|
|
Assert.False(repository.Fork);
|
|
Assert.Equal("https://github.com/Haacked/SeeGit.git", repository2.CloneUrl);
|
|
Assert.False(repository2.Private);
|
|
Assert.False(repository2.Fork);
|
|
}
|
|
}
|
|
}
|
|
}
|