diff --git a/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseLdapClient.cs b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseLdapClient.cs index d5f4bd1f68..1791d57e0c 100644 --- a/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseLdapClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/IObservableEnterpriseLdapClient.cs @@ -33,7 +33,7 @@ public interface IObservableEnterpriseLdapClient /// The username to sync LDAP mapping /// The of the queue request. IObservable QueueSyncUserMapping(string userName); - + /// /// Update the LDAP mapping for a team on a GitHub Enterprise appliance (must be Site Admin user). /// diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs index f096e496ab..0a037406f0 100644 --- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs +++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs @@ -49,7 +49,7 @@ public IObservable QueueSyncUserMapping(string userName) { return _client.QueueSyncUserMapping(userName).ToObservable(); } - + /// /// Update the LDAP mapping for a team on a GitHub Enterprise appliance (must be Site Admin user). /// diff --git a/Octokit.Reactive/Clients/IObservableIssuesClient.cs b/Octokit.Reactive/Clients/IObservableIssuesClient.cs index cae13e02a1..880d894f01 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesClient.cs @@ -157,25 +157,25 @@ public interface IObservableIssuesClient /// /// IObservable Update(string owner, string name, int number, IssueUpdate issueUpdate); - - /// - /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. - /// - /// https://developer.github.com/v3/issues/#lock-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue number - /// - IObservable LockIssue(string owner, string name, int number); - - /// - /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. - /// - /// https://developer.github.com/v3/issues/#unlock-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue number - /// - IObservable UnlockIssue(string owner, string name, int number); + + /// + /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. + /// + /// https://developer.github.com/v3/issues/#lock-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// + IObservable LockIssue(string owner, string name, int number); + + /// + /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. + /// + /// https://developer.github.com/v3/issues/#unlock-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// + IObservable UnlockIssue(string owner, string name, int number); } } \ No newline at end of file diff --git a/Octokit.Reactive/Clients/ObservableIssuesClient.cs b/Octokit.Reactive/Clients/ObservableIssuesClient.cs index 47d2b9f07b..05ad312e8b 100644 --- a/Octokit.Reactive/Clients/ObservableIssuesClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssuesClient.cs @@ -223,37 +223,37 @@ public IObservable Update(string owner, string name, int number, IssueUpd return _client.Update(owner, name, number, issueUpdate).ToObservable(); } - - /// - /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. - /// - /// https://developer.github.com/v3/issues/#lock-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue number - /// - public IObservable LockIssue(string owner, string name, int number) - { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - - return _client.LockIssue(owner, name, number).ToObservable(); - } - - /// - /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. - /// - /// https://developer.github.com/v3/issues/#unlock-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue number - /// - public IObservable UnlockIssue(string owner, string name, int number) - { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - - return _client.UnlockIssue(owner, name, number).ToObservable(); - } + + /// + /// Locks an issue for the specified repository. Issue owners and users with push access can lock an issue. + /// + /// https://developer.github.com/v3/issues/#lock-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// + public IObservable LockIssue(string owner, string name, int number) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return _client.LockIssue(owner, name, number).ToObservable(); + } + + /// + /// Unlocks an issue for the specified repository. Issue owners and users with push access can unlock an issue. + /// + /// https://developer.github.com/v3/issues/#unlock-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue number + /// + public IObservable UnlockIssue(string owner, string name, int number) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return _client.UnlockIssue(owner, name, number).ToObservable(); + } } } diff --git a/Octokit.Reactive/Helpers/ConnectionExtensions.cs b/Octokit.Reactive/Helpers/ConnectionExtensions.cs index becbf01c9a..82264eb7df 100644 --- a/Octokit.Reactive/Helpers/ConnectionExtensions.cs +++ b/Octokit.Reactive/Helpers/ConnectionExtensions.cs @@ -58,7 +58,7 @@ static IObservable GetPagesWithOptions(Uri uri, ApiOptions options, nextPageUri, options); - return shouldContinue + return shouldContinue ? Observable.Defer(() => getPageFunc(nextPageUri, null)) : Observable.Empty>>(); }) diff --git a/Octokit.Tests.Conventions/Exception/ApiOptionsMissingException.cs b/Octokit.Tests.Conventions/Exception/ApiOptionsMissingException.cs index 61d1111f12..51002dae8e 100644 --- a/Octokit.Tests.Conventions/Exception/ApiOptionsMissingException.cs +++ b/Octokit.Tests.Conventions/Exception/ApiOptionsMissingException.cs @@ -8,7 +8,8 @@ namespace Octokit.Tests.Conventions public class ApiOptionsMissingException : Exception { public ApiOptionsMissingException(Type type, IEnumerable methods) - : base(CreateMessage(type, methods)) { } + : base(CreateMessage(type, methods)) + { } static string CreateMessage(Type type, IEnumerable methods) { diff --git a/Octokit.Tests.Integration/Clients/Enterprise/EnterpriseLdapClientTests.cs b/Octokit.Tests.Integration/Clients/Enterprise/EnterpriseLdapClientTests.cs index edbca49664..5fbac3728e 100644 --- a/Octokit.Tests.Integration/Clients/Enterprise/EnterpriseLdapClientTests.cs +++ b/Octokit.Tests.Integration/Clients/Enterprise/EnterpriseLdapClientTests.cs @@ -19,7 +19,7 @@ public class EnterpriseLdapClientTests : IDisposable public EnterpriseLdapClientTests() { _github = EnterpriseHelper.GetAuthenticatedClient(); - + NewTeam newTeam = new NewTeam(Helper.MakeNameWithTimestamp("test-team")) { Description = "Test Team" }; _context = _github.CreateEnterpriseTeamContext(EnterpriseHelper.Organization, newTeam).Result; } diff --git a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs index fec271d0bf..0dc0be45dc 100644 --- a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs @@ -64,24 +64,24 @@ public async Task CanCreateRetrieveAndCloseIssue() [IntegrationTest] public async Task CanLockAndUnlockIssue() { - var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; - var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); - var retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); - - Assert.Equal(false, issue.Locked); - - await _issuesClient.LockIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); - retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); - Assert.NotNull(retrieved); - Assert.Equal(true, issue.Locked); - - await _issuesClient.UnlockIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); - retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); - Assert.NotNull(retrieved); - Assert.Equal(false, issue.Locked); - } - - [IntegrationTest] + var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; + var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); + var retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + + Assert.Equal(false, issue.Locked); + + await _issuesClient.LockIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + Assert.NotNull(retrieved); + Assert.Equal(true, issue.Locked); + + await _issuesClient.UnlockIssue(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + retrieved = await _issuesClient.Get(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + Assert.NotNull(retrieved); + Assert.Equal(false, issue.Locked); + } + + [IntegrationTest] public async Task CanListOpenIssuesWithDefaultSort() { var newIssue1 = new NewIssue("A test issue1") { Body = "A new unassigned issue" }; diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs index 78247ebc78..ebd29eb2b5 100644 --- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs @@ -447,7 +447,7 @@ public async Task DeletesRepository() var repoName = Helper.MakeNameWithTimestamp("repo-to-delete"); await github.Repository.Create(new NewRepository(repoName)); - + await github.Repository.Delete(Helper.UserName, repoName); } } diff --git a/Octokit.Tests.Integration/Clients/UserAdministrationClientTests.cs b/Octokit.Tests.Integration/Clients/UserAdministrationClientTests.cs index 321017ac3d..b9c049abd4 100644 --- a/Octokit.Tests.Integration/Clients/UserAdministrationClientTests.cs +++ b/Octokit.Tests.Integration/Clients/UserAdministrationClientTests.cs @@ -95,7 +95,7 @@ public async Task CanAddAndDeleteImpersonationToken() Assert.NotNull(token); Assert.True( - token.Scopes.Count() == 1 && + token.Scopes.Count() == 1 && token.Scopes.All(s => s == "public_repo")); // Delete Impersonation token @@ -187,7 +187,7 @@ public async Task CanDeletePublicKey() { // Ensure user has a key //var key = await _github.User.Keys.Create(new NewPublicKey("title", "key")); - + // Delete key //await _github.User.Administration.DeletePublicKey(key.Id); } diff --git a/Octokit.Tests.Integration/Clients/UserEmailsClientTests.cs b/Octokit.Tests.Integration/Clients/UserEmailsClientTests.cs index 12ac23e496..492132ceda 100644 --- a/Octokit.Tests.Integration/Clients/UserEmailsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/UserEmailsClientTests.cs @@ -41,7 +41,7 @@ public async Task ReturnsCorrectCountOfEmailsWithoutStart() Assert.NotEmpty(emails); } - + const string testEmailAddress = "hahaha-not-a-real-email@foo.com"; [IntegrationTest(Skip = "this isn't passing in CI - i hate past me right now")] diff --git a/Octokit.Tests.Integration/EnterpriseHelper.cs b/Octokit.Tests.Integration/EnterpriseHelper.cs index 7e03a604a2..baf16c9a33 100644 --- a/Octokit.Tests.Integration/EnterpriseHelper.cs +++ b/Octokit.Tests.Integration/EnterpriseHelper.cs @@ -55,7 +55,7 @@ public static class EnterpriseHelper string enabled = Environment.GetEnvironmentVariable("OCTOKIT_GHE_ENABLED"); return !String.IsNullOrWhiteSpace(enabled); }); - + static readonly Lazy _gitHubEnterpriseUrl = new Lazy(() => { string uri = Environment.GetEnvironmentVariable("OCTOKIT_GHE_URL"); @@ -76,7 +76,7 @@ static EnterpriseHelper() public static string UserName { get; private set; } public static string Organization { get; private set; } - + /// /// These credentials should be set to a test GitHub account using the powershell script configure-integration-tests.ps1 /// @@ -88,8 +88,8 @@ static EnterpriseHelper() public static bool IsGitHubEnterpriseEnabled { get { return _gitHubEnterpriseEnabled.Value; } } - public static Uri GitHubEnterpriseUrl { get { return _gitHubEnterpriseUrl.Value; } } - + public static Uri GitHubEnterpriseUrl { get { return _gitHubEnterpriseUrl.Value; } } + public static bool IsUsingToken { get diff --git a/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs b/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs index dde932d8c9..948a52a65a 100644 --- a/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs @@ -14,10 +14,10 @@ public class ObservableEnterpriseLdapClientTests : IDisposable readonly string _testUser = "test-user"; readonly string _distinguishedNameUser = "uid=test-user,ou=users,dc=company,dc=com"; - + readonly EnterpriseTeamContext _context; readonly string _distinguishedNameTeam = "cn=test-team,ou=groups,dc=company,dc=com"; - + public ObservableEnterpriseLdapClientTests() { _github = new ObservableGitHubClient(EnterpriseHelper.GetAuthenticatedClient()); diff --git a/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs index 1b40a7ac92..e1ec869d83 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs @@ -72,23 +72,23 @@ public async Task CanCreateAndUpdateIssues() Assert.Equal("Modified integration test issue", updateResult.Title); } - [IntegrationTest] - public async Task CanLockAndUnlockIssues() - { - var newIssue = new NewIssue("Integration Test Issue"); - - var createResult = await _client.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); - Assert.Equal(false, createResult.Locked); - - await _client.LockIssue(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); - var lockResult = await _client.Get(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); - Assert.Equal(true, lockResult.Locked); - - await _client.UnlockIssue(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); - var unlockIssueResult = await _client.Get(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); - Assert.Equal(false, unlockIssueResult.Locked); + [IntegrationTest] + public async Task CanLockAndUnlockIssues() + { + var newIssue = new NewIssue("Integration Test Issue"); + + var createResult = await _client.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); + Assert.Equal(false, createResult.Locked); + + await _client.LockIssue(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); + var lockResult = await _client.Get(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); + Assert.Equal(true, lockResult.Locked); + + await _client.UnlockIssue(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); + var unlockIssueResult = await _client.Get(_context.RepositoryOwner, _context.RepositoryName, createResult.Number); + Assert.Equal(false, unlockIssueResult.Locked); } - + public void Dispose() { _context.Dispose(); diff --git a/Octokit.Tests.Integration/Reactive/ObservableUserKeysClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableUserKeysClientTests.cs index cf56317b7b..4e48c55f53 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableUserKeysClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableUserKeysClientTests.cs @@ -68,7 +68,7 @@ public async Task CanCreateAndDeleteKey() // Create a key string keyTitle = "title"; string keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAjo4DqFKg8dOxiz/yjypmN1A4itU5QOStyYrfOFuTinesU/2zm9hqxJ5BctIhgtSHJ5foxkhsiBji0qrUg73Q25BThgNg8YFE8njr4EwjmqSqW13akx/zLV0GFFU0SdJ2F6rBldhi93lMnl0ex9swBqa3eLTY8C+HQGBI6MQUMw+BKp0oFkz87Kv+Pfp6lt/Uo32ejSxML1PT5hTH5n+fyl0ied+sRmPGZWmWoHB5Bc9mox7lB6I6A/ZgjtBqbEEn4HQ2/6vp4ojKfSgA4Mm7XMu0bZzX0itKjH1QWD9Lr5apV1cmZsj49Xf8SHucTtH+bq98hb8OOXEGFzplwsX2MQ=="; - + var observable = _github.User.Keys.Create(new NewPublicKey(keyTitle, keyData)); var key = await observable; diff --git a/Octokit.Tests/Clients/Enterprise/EnterpriseOrganizationClientTests.cs b/Octokit.Tests/Clients/Enterprise/EnterpriseOrganizationClientTests.cs index 4b078b1290..b3c815b565 100644 --- a/Octokit.Tests/Clients/Enterprise/EnterpriseOrganizationClientTests.cs +++ b/Octokit.Tests/Clients/Enterprise/EnterpriseOrganizationClientTests.cs @@ -17,7 +17,7 @@ public void RequestsCorrectUrl() string expectedUri = "admin/organizations"; client.Create(new NewOrganization("org", "admin", "org name")); - + connection.Received().Post(Arg.Is(u => u.ToString() == expectedUri), Arg.Any()); } diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs index e74cc97b83..0dadb511f5 100644 --- a/Octokit.Tests/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs @@ -404,7 +404,6 @@ public void CanFilterByAffiliation() var request = new RepositoryRequest { - Affiliation = RepositoryAffiliation.Owner, Sort = RepositorySort.FullName }; diff --git a/Octokit.Tests/Clients/RepositoryContentsClientTests.cs b/Octokit.Tests/Clients/RepositoryContentsClientTests.cs index 0e59b5334d..5dea73d816 100644 --- a/Octokit.Tests/Clients/RepositoryContentsClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryContentsClientTests.cs @@ -100,7 +100,7 @@ public void RequestsCorrectUrl() string expectedUri = "repos/org/repo/contents/path/to/file"; client.CreateFile("org", "repo", "path/to/file", new CreateFileRequest("message", "myfilecontents", "mybranch")); - + connection.Received().Put(Arg.Is(u => u.ToString() == expectedUri), Arg.Any()); } diff --git a/Octokit.Tests/Clients/UserAdministrationClientTests.cs b/Octokit.Tests/Clients/UserAdministrationClientTests.cs index 4174b06be5..4712b24b2e 100644 --- a/Octokit.Tests/Clients/UserAdministrationClientTests.cs +++ b/Octokit.Tests/Clients/UserAdministrationClientTests.cs @@ -29,7 +29,7 @@ public void RequestsTheCorrectUrl() client.Create(new NewUser("name", "email@company.com")); connection.Received().Post( - Arg.Is(u => u.ToString() == expectedUri), + Arg.Is(u => u.ToString() == expectedUri), Arg.Any()); } @@ -38,13 +38,13 @@ public void PassesRequestObject() { var connection = Substitute.For(); var client = new UserAdministrationClient(connection); - + client.Create(new NewUser("name", "email@company.com")); connection.Received().Post( - Arg.Any(), + Arg.Any(), Arg.Is(a => - a.Login == "name" && + a.Login == "name" && a.Email == "email@company.com")); } } diff --git a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs index a1fc976947..ec8de49524 100644 --- a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs +++ b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseLdapClientTests.cs @@ -10,7 +10,7 @@ public class ObservableEnterpriseLDAPClientTests public class TheUpdateUserMappingMethod { readonly string _distinguishedName = "uid=test-user,ou=users,dc=company,dc=com"; - + [Fact] public void CallsIntoClient() { @@ -20,11 +20,11 @@ public void CallsIntoClient() client.UpdateUserMapping("test-user", new NewLdapMapping(_distinguishedName)); github.Enterprise.Ldap.Received(1).UpdateUserMapping( Arg.Is(a => a == "test-user"), - Arg.Is(a => + Arg.Is(a => a.LdapDistinguishedName == _distinguishedName)); } } - + public class TheQueueSyncUserMappingMethod { [Fact] @@ -38,11 +38,11 @@ public void CallsIntoClient() Arg.Is(a => a == "test-user")); } } - + public class TheUpdateTeamMappingMethod { readonly string _distinguishedName = "cn=test-team,ou=groups,dc=company,dc=com"; - + [Fact] public void CallsIntoClient() { @@ -52,11 +52,11 @@ public void CallsIntoClient() client.UpdateTeamMapping(1, new NewLdapMapping(_distinguishedName)); github.Enterprise.Ldap.Received(1).UpdateTeamMapping( Arg.Is(a => a == 1), - Arg.Is(a => + Arg.Is(a => a.LdapDistinguishedName == _distinguishedName)); } } - + public class TheQueueSyncTeamMappingMethod { [Fact] diff --git a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseOrganizationClientTests.cs b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseOrganizationClientTests.cs index 47046e05fd..5e849d849a 100644 --- a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseOrganizationClientTests.cs +++ b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseOrganizationClientTests.cs @@ -17,9 +17,9 @@ public void CallsIntoClient() client.Create(new NewOrganization("org", "admin", "org name")); github.Enterprise.Organization.Received(1).Create( - Arg.Is(a => - a.Login == "org" - && a.Admin == "admin" + Arg.Is(a => + a.Login == "org" + && a.Admin == "admin" && a.ProfileName == "org name")); } } diff --git a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseSearchIndexingClientTests.cs b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseSearchIndexingClientTests.cs index 491acbfc10..e185081fe6 100644 --- a/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseSearchIndexingClientTests.cs +++ b/Octokit.Tests/Reactive/Enterprise/ObservableEnterpriseSearchIndexingClientTests.cs @@ -17,7 +17,7 @@ public void CallsIntoClient() client.Queue("org"); github.Enterprise.SearchIndexing.Received(1). - Queue(Arg.Is( "org" )); + Queue(Arg.Is("org")); client.Queue("org", "repo"); github.Enterprise.SearchIndexing.Received(1). diff --git a/Octokit.Tests/Reactive/ObservableUserAdministrationClientTests.cs b/Octokit.Tests/Reactive/ObservableUserAdministrationClientTests.cs index d247ddb30f..682a09b64c 100644 --- a/Octokit.Tests/Reactive/ObservableUserAdministrationClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableUserAdministrationClientTests.cs @@ -19,7 +19,7 @@ public void CallsIntoClient() client.Create(new NewUser("auser", "email@company.com")); gitHubClient.User.Administration.Received().Create( - Arg.Is(a => + Arg.Is(a => a.Login == "auser" && a.Email == "email@company.com")); } diff --git a/Octokit/Clients/Enterprise/EnterpriseLdapClient.cs b/Octokit/Clients/Enterprise/EnterpriseLdapClient.cs index 6357da504e..1980dc6f1a 100644 --- a/Octokit/Clients/Enterprise/EnterpriseLdapClient.cs +++ b/Octokit/Clients/Enterprise/EnterpriseLdapClient.cs @@ -45,7 +45,7 @@ public Task UpdateUserMapping(string userName, NewLdapMapping newLdapMappi public async Task QueueSyncUserMapping(string userName) { Ensure.ArgumentNotNull(userName, "userName"); - + var endpoint = ApiUrls.EnterpriseLdapUserSync(userName); var response = await Connection.Post(endpoint); @@ -56,7 +56,7 @@ public async Task QueueSyncUserMapping(string userName) return response.Body; } - + /// /// Update the LDAP mapping for a team on a GitHub Enterprise appliance (must be Site Admin user). /// @@ -87,7 +87,7 @@ public Task UpdateTeamMapping(int teamId, NewLdapMapping newLdapMapping) public async Task QueueSyncTeamMapping(int teamId) { Ensure.ArgumentNotNull(teamId, "teamId"); - + var endpoint = ApiUrls.EnterpriseLdapTeamSync(teamId); var response = await Connection.Post(endpoint); diff --git a/Octokit/Clients/Enterprise/EnterpriseSearchIndexingClient.cs b/Octokit/Clients/Enterprise/EnterpriseSearchIndexingClient.cs index 7e157bfbcf..2351a2f115 100644 --- a/Octokit/Clients/Enterprise/EnterpriseSearchIndexingClient.cs +++ b/Octokit/Clients/Enterprise/EnterpriseSearchIndexingClient.cs @@ -146,7 +146,7 @@ public async Task QueueAllCode(string owner, string repo public async Task QueueAllCode(string owner) { Ensure.ArgumentNotNull(owner, "owner"); - + var endpoint = ApiUrls.EnterpriseSearchIndexing(); var target = new SearchIndexTarget(string.Format(CultureInfo.InvariantCulture, "{0}/*/code", owner)); diff --git a/Octokit/Clients/UserAdministrationClient.cs b/Octokit/Clients/UserAdministrationClient.cs index a39fcb8dd8..1b7a15e60d 100644 --- a/Octokit/Clients/UserAdministrationClient.cs +++ b/Octokit/Clients/UserAdministrationClient.cs @@ -218,7 +218,7 @@ public async Task DeletePublicKey(int keyId) { Ensure.ArgumentNotNull(keyId, "keyId"); var endpoint = ApiUrls.UserAdministrationPublicKeys(keyId); - + var response = ((HttpStatusCode)await Connection.Delete(endpoint)); if (response != HttpStatusCode.NoContent) { diff --git a/Octokit/Clients/UserEmailsClient.cs b/Octokit/Clients/UserEmailsClient.cs index fc638cd060..9dd9736bc8 100644 --- a/Octokit/Clients/UserEmailsClient.cs +++ b/Octokit/Clients/UserEmailsClient.cs @@ -32,7 +32,7 @@ public Task> GetAll() { return GetAll(ApiOptions.None); } - + /// /// Gets all email addresses for the authenticated user. /// diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index 4984870b61..81966a101e 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -141,7 +141,7 @@ public interface IApiConnection /// The created API resource. /// Thrown when an API error occurs. Task Post(Uri uri); - + /// /// Creates a new API resource in the list at the specified URI. /// diff --git a/Octokit/Models/Request/CreateFileRequest.cs b/Octokit/Models/Request/CreateFileRequest.cs index b9529e3bff..7104b3642d 100644 --- a/Octokit/Models/Request/CreateFileRequest.cs +++ b/Octokit/Models/Request/CreateFileRequest.cs @@ -26,7 +26,7 @@ protected ContentRequest(string message) /// /// The message. /// The branch the request is for. - protected ContentRequest(string message, string branch): this(message) + protected ContentRequest(string message, string branch) : this(message) { Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); diff --git a/SolutionInfo.cs b/SolutionInfo.cs index a52961be74..22509412fb 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -6,8 +6,10 @@ [assembly: AssemblyVersionAttribute("0.19.0")] [assembly: AssemblyFileVersionAttribute("0.19.0")] [assembly: ComVisibleAttribute(false)] -namespace System { - internal static class AssemblyVersionInformation { +namespace System +{ + internal static class AssemblyVersionInformation + { internal const string Version = "0.19.0"; } }