mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Rename "null user" tests to better explain purpose
This commit is contained in:
@ -62,7 +62,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
return roomUser;
|
||||
}
|
||||
|
||||
public void AddNullUser() => addUser(new MultiplayerRoomUser(TestUserLookupCache.NULL_USER_ID));
|
||||
public void TestAddUnresolvedUser() => addUser(new MultiplayerRoomUser(TestUserLookupCache.UNRESOLVED_USER_ID));
|
||||
|
||||
private void addUser(MultiplayerRoomUser user)
|
||||
{
|
||||
|
@ -14,11 +14,11 @@ namespace osu.Game.Tests.Visual
|
||||
/// A special user ID which <see cref="ComputeValueAsync"/> would return a <see langword="null"/> <see cref="User"/> for.
|
||||
/// As a simulation to what a regular <see cref="UserLookupCache"/> would return in the case of failing to fetch the user.
|
||||
/// </summary>
|
||||
public const int NULL_USER_ID = -1;
|
||||
public const int UNRESOLVED_USER_ID = -1;
|
||||
|
||||
protected override Task<User> ComputeValueAsync(int lookup, CancellationToken token = default)
|
||||
{
|
||||
if (lookup == NULL_USER_ID)
|
||||
if (lookup == UNRESOLVED_USER_ID)
|
||||
return Task.FromResult((User)null);
|
||||
|
||||
return Task.FromResult(new User
|
||||
|
Reference in New Issue
Block a user