mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
add attribute for tracking preview usage in the codebase (#2128)
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Octokit.Tests.Reactive
|
||||
{
|
||||
ApiInfo = new ApiInfo(new Dictionary<string, Uri>(), new List<string>(), new List<string>(), "etag", new RateLimit()),
|
||||
}, result);
|
||||
gitHubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview")
|
||||
gitHubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview+json")
|
||||
.Returns(Task.FromResult(response));
|
||||
|
||||
var timelineEvents = await client.GetAllForIssue("fake", "repo", 42).ToList();
|
||||
@@ -45,7 +45,7 @@ namespace Octokit.Tests.Reactive
|
||||
connection.Received().Get<List<TimelineEventInfo>>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/42/timeline"),
|
||||
Arg.Any<Dictionary<string, string>>(),
|
||||
"application/vnd.github.mockingbird-preview");
|
||||
"application/vnd.github.mockingbird-preview+json");
|
||||
Assert.Equal(1, timelineEvents.Count);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Octokit.Tests.Reactive
|
||||
{
|
||||
ApiInfo = new ApiInfo(new Dictionary<string, Uri>(), new List<string>(), new List<string>(), "etag", new RateLimit()),
|
||||
}, result);
|
||||
gitHubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Arg.Is<Dictionary<string, string>>(d => d.Count == 1), "application/vnd.github.mockingbird-preview")
|
||||
gitHubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Arg.Is<Dictionary<string, string>>(d => d.Count == 1), "application/vnd.github.mockingbird-preview+json")
|
||||
.Returns(Task.FromResult(response));
|
||||
|
||||
var timelineEvents = await client.GetAllForIssue("fake", "repo", 42, new ApiOptions { PageSize = 30 }).ToList();
|
||||
@@ -71,7 +71,7 @@ namespace Octokit.Tests.Reactive
|
||||
connection.Received().Get<List<TimelineEventInfo>>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/42/timeline"),
|
||||
Arg.Is<Dictionary<string, string>>(d => d.Count == 1 && d["per_page"] == "30"),
|
||||
"application/vnd.github.mockingbird-preview");
|
||||
"application/vnd.github.mockingbird-preview+json");
|
||||
Assert.Equal(1, timelineEvents.Count);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Octokit.Tests.Reactive
|
||||
{
|
||||
ApiInfo = new ApiInfo(new Dictionary<string, Uri>(), new List<string>(), new List<string>(), "etag", new RateLimit()),
|
||||
}, result);
|
||||
githubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview")
|
||||
githubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Args.EmptyDictionary, "application/vnd.github.mockingbird-preview+json")
|
||||
.Returns(Task.FromResult(response));
|
||||
|
||||
var timelineEvents = await client.GetAllForIssue(1, 42).ToList();
|
||||
@@ -96,7 +96,7 @@ namespace Octokit.Tests.Reactive
|
||||
connection.Received().Get<List<TimelineEventInfo>>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "repositories/1/issues/42/timeline"),
|
||||
Arg.Any<Dictionary<string, string>>(),
|
||||
"application/vnd.github.mockingbird-preview");
|
||||
"application/vnd.github.mockingbird-preview+json");
|
||||
Assert.Equal(1, timelineEvents.Count);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Octokit.Tests.Reactive
|
||||
{
|
||||
ApiInfo = new ApiInfo(new Dictionary<string, Uri>(), new List<string>(), new List<string>(), "etag", new RateLimit()),
|
||||
}, result);
|
||||
githubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Arg.Is<Dictionary<string, string>>(d => d.Count == 1), "application/vnd.github.mockingbird-preview")
|
||||
githubClient.Connection.Get<List<TimelineEventInfo>>(Args.Uri, Arg.Is<Dictionary<string, string>>(d => d.Count == 1), "application/vnd.github.mockingbird-preview+json")
|
||||
.Returns(Task.FromResult(response));
|
||||
|
||||
var timelineEvents = await client.GetAllForIssue(1, 42, new ApiOptions { PageSize = 30 }).ToList();
|
||||
@@ -121,7 +121,7 @@ namespace Octokit.Tests.Reactive
|
||||
connection.Received().Get<List<TimelineEventInfo>>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "repositories/1/issues/42/timeline"),
|
||||
Arg.Is<Dictionary<string, string>>(d => d.Count == 1 && d["per_page"] == "30"),
|
||||
"application/vnd.github.mockingbird-preview");
|
||||
"application/vnd.github.mockingbird-preview+json");
|
||||
Assert.Equal(1, timelineEvents.Count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user