aaaand format the code

This commit is contained in:
Brendan Forster
2015-11-04 13:38:51 -08:00
parent 3305dfcf4f
commit 80719c0033
199 changed files with 442 additions and 438 deletions
@@ -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()));