mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-30 09:49:04 +00:00
fix method names for reaction clients
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create </param>
|
||||
/// <returns></returns>
|
||||
IObservable<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction);
|
||||
IObservable<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
|
||||
/// <summary>
|
||||
/// List reactions for a specified Commit Comment
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="number">The issue id</param>
|
||||
/// <param name="reaction">The reaction to create </param>
|
||||
/// <returns></returns>
|
||||
IObservable<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction);
|
||||
IObservable<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
|
||||
/// <summary>
|
||||
/// List reactions for a specified Commit Comment
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace Octokit.Reactive
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
public IObservable<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction)
|
||||
public IObservable<Reaction> Create(string owner, string name, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(reaction, "reaction");
|
||||
|
||||
return _client.CreateReaction(owner, name, number, reaction).ToObservable();
|
||||
return _client.Create(owner, name, number, reaction).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace Octokit.Reactive
|
||||
/// <param name="number">The issue id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
public IObservable<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction)
|
||||
public IObservable<Reaction> Create(string owner, string name, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(reaction, "reaction");
|
||||
|
||||
return _client.CreateReaction(owner, name, number, reaction).ToObservable();
|
||||
return _client.Create(owner, name, number, reaction).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@ using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Clients
|
||||
{
|
||||
public class CommitCommentsReactionsClientTests
|
||||
public class CommitCommentReactionsClientTests
|
||||
{
|
||||
public class TheCtor
|
||||
{
|
||||
@@ -35,11 +35,11 @@ namespace Octokit.Tests.Clients
|
||||
var connection = Substitute.For<IApiConnection>();
|
||||
var client = new ReactionsClient(connection);
|
||||
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.CommitComment.CreateReaction(null, "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.CreateReaction("", "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.CommitComment.CreateReaction("owner", null, 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.CreateReaction("owner", "", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.CreateReaction("owner", "name", 1, null));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.CommitComment.Create(null, "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.Create("", "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.CommitComment.Create("owner", null, 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.Create("owner", "", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.CommitComment.Create("owner", "name", 1, null));
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@ using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Clients
|
||||
{
|
||||
public class IssuesReactionsClientTests
|
||||
public class IssueReactionsClientTests
|
||||
{
|
||||
public class TheCtor
|
||||
{
|
||||
@@ -35,11 +35,11 @@ namespace Octokit.Tests.Clients
|
||||
var connection = Substitute.For<IApiConnection>();
|
||||
var client = new ReactionsClient(connection);
|
||||
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Issue.CreateReaction(null, "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.CreateReaction("", "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Issue.CreateReaction("owner", null, 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.CreateReaction("owner", "", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.CreateReaction("owner", "name", 1, null));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Issue.Create(null, "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.Create("", "name", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Issue.Create("owner", null, 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.Create("owner", "", 1, new NewReaction(ReactionType.Heart)));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => client.Issue.Create("owner", "name", 1, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Authentication\CredentialsTests.cs" />
|
||||
<Compile Include="Clients\CommitCommentsReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\IssuesReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\CommitCommentReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\IssueReactionsClientTests.cs" />
|
||||
<Compile Include="Clients\MigrationsClientTests.cs" />
|
||||
<Compile Include="Clients\Enterprise\EnterpriseAdminStatsClientTests.cs" />
|
||||
<Compile Include="Clients\Enterprise\EnterpriseLdapClientTests.cs" />
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Octokit
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
public Task<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction)
|
||||
public Task<Reaction> Create(string owner, string name, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Octokit
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
Task<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction);
|
||||
Task<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Commit Comment
|
||||
|
||||
@@ -24,6 +24,6 @@ namespace Octokit
|
||||
/// <param name="number">The issue id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
Task<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction);
|
||||
Task<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Octokit
|
||||
/// <param name="number">The issue id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns></returns>
|
||||
public Task<Reaction> CreateReaction(string owner, string name, int number, NewReaction reaction)
|
||||
public Task<Reaction> Create(string owner, string name, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNull(owner, "owner");
|
||||
Ensure.ArgumentNotNull(name, "name");
|
||||
|
||||
Reference in New Issue
Block a user