another try to get tests work

This commit is contained in:
aedampir@gmail.com
2016-05-20 23:07:48 +07:00
parent e44f4c5252
commit 63b19ca3d4
2 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -232,7 +232,8 @@ namespace Octokit.Tests.Clients
await client.GetAllAssets("fake", "repo", 1, options);
connection.Received().GetAll<ReleaseAsset>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/releases/1/assets"),
connection.Received().GetAll<ReleaseAsset>(
Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/releases/1/assets"),
null,
"application/vnd.github.v3", options);
}
@@ -188,6 +188,8 @@ namespace Octokit.Tests.Reactive
[Fact]
public void RequestsTheCorrectUrlWithApiOptions()
{
var expectedUrl = string.Format("repos/{0}/{1}/releases/1/assets", "fake", "repo");
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableReleasesClient(gitHubClient);
@@ -199,9 +201,11 @@ namespace Octokit.Tests.Reactive
};
client.GetAllAssets("fake", "repo", 1, options);
gitHubClient.Connection.Received(1).Get<List<ReleaseAsset>>(
new Uri("repos/fake/repo/releases/1/assets", UriKind.Relative), Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2), null);
Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2),
null);
}
[Fact]