mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Add test coverage of null users in scoreboard
This commit is contained in:
parent
447a55ce11
commit
8f0413472c
@ -90,11 +90,17 @@ namespace osu.Game.Tests.Visual.Online
|
||||
};
|
||||
|
||||
protected override Task<User> ComputeValueAsync(int lookup, CancellationToken token = default)
|
||||
=> Task.FromResult(new User
|
||||
{
|
||||
// tests against failed lookups
|
||||
if (lookup == 13)
|
||||
return Task.FromResult<User>(null);
|
||||
|
||||
return Task.FromResult(new User
|
||||
{
|
||||
Id = lookup,
|
||||
Username = usernames[lookup % usernames.Length],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user