Skip to content

Commit f4986f6

Browse files
HandyS11claude
andcommitted
fix(3c-ii): address Copilot review on PR #12
- ServerResolver ctor XML doc: 'servers' is the IServerService, not a list. - Rename ServerResolver test DefaultsToSingleServer_IgnoringArg -> DefaultsToSingleServer_WhenNoArg: it passes a null arg, so the name now matches what it covers. (The single-server + explicit-non-matching-arg -> 'unknown' path is already covered by ReturnsUnknownError_WhenArgNotRegistered.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 676572d commit f4986f6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/RustPlusBot.Features.Commands/Servers/ServerResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace RustPlusBot.Features.Commands.Servers;
55

66
/// <summary>Picks the target server for a slash command from an optional (autocompleted) server argument.</summary>
7-
/// <param name="servers">The guild's server list.</param>
7+
/// <param name="servers">The server service used to list the guild's servers.</param>
88
/// <param name="localizer">Resolves the error messages.</param>
99
internal sealed class ServerResolver(IServerService servers, ICommandLocalizer localizer)
1010
{

tests/RustPlusBot.Features.Commands.Tests/Servers/ServerResolverTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task ReturnsError_WhenNoServers()
3131
}
3232

3333
[Fact]
34-
public async Task DefaultsToSingleServer_IgnoringArg()
34+
public async Task DefaultsToSingleServer_WhenNoArg()
3535
{
3636
var id = Guid.NewGuid();
3737
var r = await Build(Server(id, "Main")).ResolveAsync(1UL, null, "en", CancellationToken.None);

0 commit comments

Comments
 (0)