1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Rewrite assertions to be better

This commit is contained in:
Bartłomiej Dach 2023-06-18 18:48:54 +02:00
parent ee08ed414c
commit 1a6a66e953
No known key found for this signature in database

View File

@ -4,6 +4,7 @@
#nullable disable
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@ -90,7 +91,7 @@ namespace osu.Game.Tournament.Tests.Components
}));
AddUntilStep("message from team red is red color", () =>
this.ChildrenOfType<DrawableChatUsername>().Any(s => s.AccentColour == TournamentGame.COLOUR_RED));
this.ChildrenOfType<DrawableChatUsername>().Last().AccentColour, () => Is.EqualTo(TournamentGame.COLOUR_RED));
AddStep("message from team red", () => testChannel.AddNewMessages(new Message(nextMessageId())
{
@ -105,7 +106,7 @@ namespace osu.Game.Tournament.Tests.Components
}));
AddUntilStep("message from team blue is blue color", () =>
this.ChildrenOfType<DrawableChatUsername>().Any(s => s.AccentColour == TournamentGame.COLOUR_BLUE));
this.ChildrenOfType<DrawableChatUsername>().Last().AccentColour, () => Is.EqualTo(TournamentGame.COLOUR_BLUE));
AddStep("message from admin", () => testChannel.AddNewMessages(new Message(nextMessageId())
{