feat: Removing accept header previews (#2515)

This commit is contained in:
Chris Simpson
2022-08-01 15:37:23 +01:00
committed by GitHub
parent 840935a8d7
commit 2f7bd00dd6
138 changed files with 954 additions and 1659 deletions
@@ -69,8 +69,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
}
[Fact]
@@ -81,8 +80,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
}
[Fact]
@@ -101,8 +99,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 3),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 3));
// StartPage is setted => only 1 option (StartPage) in dictionary
options = new ApiOptions
@@ -113,8 +110,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2));
// PageCount is setted => none of options in dictionary
options = new ApiOptions
@@ -125,8 +121,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
}
[Fact]
@@ -139,8 +134,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "all"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "all"));
request = new RepositoryCollaboratorListRequest
{
@@ -150,8 +144,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "direct"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "direct"));
// PageCount is setted => none of options in dictionary
request = new RepositoryCollaboratorListRequest
@@ -162,8 +155,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(owner, name, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "outside"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "outside"));
}
[Fact]
@@ -182,8 +174,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 3),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 3));
// StartPage is setted => only 1 option (StartPage) in dictionary
options = new ApiOptions
@@ -194,8 +185,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 2));
// PageCount is setted => none of options in dictionary
options = new ApiOptions
@@ -206,8 +196,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, options);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1),
null);
Arg.Is<IDictionary<string, string>>(dictionary => dictionary.Count == 1));
}
[Fact]
@@ -220,8 +209,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "all"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "all"));
request = new RepositoryCollaboratorListRequest
{
@@ -231,8 +219,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "direct"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "direct"));
request = new RepositoryCollaboratorListRequest
{
@@ -242,8 +229,7 @@ namespace Octokit.Tests.Reactive
_client.GetAll(repositoryId, request);
_githubClient.Connection.Received(1)
.Get<List<User>>(Arg.Is<Uri>(u => u.ToString() == expectedUrl),
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "outside"),
null);
Arg.Is<IDictionary<string, string>>(d => d["affiliation"] == "outside"));
}
}