mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 12:35:34 +08:00
Elongate usernames in DrawableChannel
test
This commit is contained in:
parent
a2a73232f3
commit
71649005bf
@ -6,6 +6,7 @@ using System.Linq;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
using osu.Game.Overlays.Chat;
|
using osu.Game.Overlays.Chat;
|
||||||
@ -88,19 +89,17 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestBackgroundAlternating()
|
public void TestBackgroundAlternating()
|
||||||
{
|
{
|
||||||
var localUser = new APIUser
|
|
||||||
{
|
|
||||||
Id = 3,
|
|
||||||
Username = "LocalUser"
|
|
||||||
};
|
|
||||||
|
|
||||||
int messageCount = 1;
|
int messageCount = 1;
|
||||||
|
|
||||||
AddRepeatStep("add messages", () =>
|
AddRepeatStep("add messages", () =>
|
||||||
{
|
{
|
||||||
channel.AddNewMessages(new Message(messageCount)
|
channel.AddNewMessages(new Message(messageCount)
|
||||||
{
|
{
|
||||||
Sender = localUser,
|
Sender = new APIUser
|
||||||
|
{
|
||||||
|
Id = 3,
|
||||||
|
Username = "LocalUser " + RNG.Next(0, int.MaxValue - 100).ToString("N")
|
||||||
|
},
|
||||||
Content = "Hi there all!",
|
Content = "Hi there all!",
|
||||||
Timestamp = new DateTimeOffset(2022, 11, 21, 20, messageCount, 13, TimeSpan.Zero),
|
Timestamp = new DateTimeOffset(2022, 11, 21, 20, messageCount, 13, TimeSpan.Zero),
|
||||||
Uuid = Guid.NewGuid().ToString(),
|
Uuid = Guid.NewGuid().ToString(),
|
||||||
|
Loading…
Reference in New Issue
Block a user