mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 02:45:32 +00:00
aaaand format the code
This commit is contained in:
@@ -26,9 +26,9 @@ namespace Octokit.Tests.Exceptions
|
||||
public void SetsSpecifiedExceptionMessageAndInnerException()
|
||||
{
|
||||
var inner = new InvalidOperationException();
|
||||
|
||||
|
||||
var exception = new ApiException("Shit broke", inner);
|
||||
|
||||
|
||||
Assert.Equal("Shit broke", exception.Message);
|
||||
Assert.Same(inner, exception.InnerException);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace Octokit.Tests.Exceptions
|
||||
var response = new Response(
|
||||
(HttpStatusCode)422,
|
||||
@"{""errors"":[{""code"":""custom"",""field"":""key"",""message"":""key is " +
|
||||
@"already in use"",""resource"":""PublicKey""}],""message"":""Validation Failed""}",
|
||||
new Dictionary<string, string>(),
|
||||
@"already in use"",""resource"":""PublicKey""}],""message"":""Validation Failed""}",
|
||||
new Dictionary<string, string>(),
|
||||
"application/json"
|
||||
);
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Octokit.Tests.Exceptions
|
||||
@"already in use"",""resource"":""PublicKey""}],""message"":""Validation Failed""}",
|
||||
new Dictionary<string, string>(),
|
||||
"application/json");
|
||||
|
||||
|
||||
var exception = new ApiValidationException(response);
|
||||
|
||||
using (var stream = new MemoryStream())
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Octokit.Tests.Exceptions
|
||||
[Fact]
|
||||
public void HasDefaultMessage()
|
||||
{
|
||||
var response = new Response(HttpStatusCode.Forbidden , null, new Dictionary<string, string>(), "application/json");
|
||||
var response = new Response(HttpStatusCode.Forbidden, null, new Dictionary<string, string>(), "application/json");
|
||||
var forbiddenException = new ForbiddenException(response);
|
||||
|
||||
Assert.Equal("Request Forbidden", forbiddenException.Message);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Octokit.Tests.Exceptions
|
||||
{"X-RateLimit-Reset", "XXXX"}
|
||||
};
|
||||
var response = new Response(HttpStatusCode.Forbidden, null, headers, "application/json");
|
||||
|
||||
|
||||
var exception = new RateLimitExceededException(response);
|
||||
|
||||
Assert.Equal(HttpStatusCode.Forbidden, exception.StatusCode);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Octokit.Tests.Exceptions
|
||||
public void WhenOrganizationIsNullShouldThrowArgumentNullException()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(() => new RepositoryExistsException(
|
||||
null,
|
||||
null,
|
||||
"some-repo",
|
||||
GitHubClient.GitHubDotComUrl,
|
||||
new ApiValidationException()));
|
||||
|
||||
Reference in New Issue
Block a user