mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Rename classes
This commit is contained in:
@ -17,8 +17,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(FriendsLayout),
|
||||
typeof(FriendsOnlineStatusControl),
|
||||
typeof(FriendDisplay),
|
||||
typeof(FriendOnlineStreamControl),
|
||||
typeof(UserListToolbar)
|
||||
};
|
||||
|
||||
@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||
|
||||
private FriendsLayout layout;
|
||||
private FriendDisplay display;
|
||||
|
||||
[SetUp]
|
||||
public void Setup() => Schedule(() =>
|
||||
@ -35,20 +35,20 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Child = new BasicScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = layout = new FriendsLayout()
|
||||
Child = display = new FriendDisplay()
|
||||
};
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void TestOffline()
|
||||
{
|
||||
AddStep("Populate", () => layout.Users = getUsers());
|
||||
AddStep("Populate", () => display.Users = getUsers());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOnline()
|
||||
{
|
||||
AddStep("Fetch online", () => layout?.Fetch());
|
||||
AddStep("Fetch online", () => display?.Fetch());
|
||||
}
|
||||
|
||||
private List<User> getUsers() => new List<User>
|
||||
|
@ -17,20 +17,20 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(FriendsOnlineStatusControl),
|
||||
typeof(FriendOnlineStreamControl),
|
||||
typeof(FriendsOnlineStatusItem),
|
||||
typeof(OverlayStreamControl<>),
|
||||
typeof(OverlayStreamItem<>),
|
||||
typeof(FriendsBundle)
|
||||
typeof(FriendStream)
|
||||
};
|
||||
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||
|
||||
private FriendsOnlineStatusControl control;
|
||||
private FriendOnlineStreamControl control;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp() => Schedule(() => Child = control = new FriendsOnlineStatusControl
|
||||
public void SetUp() => Schedule(() => Child = control = new FriendOnlineStreamControl
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
@ -55,9 +55,9 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
}
|
||||
}));
|
||||
|
||||
AddAssert("3 users", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.All)?.Count == 3);
|
||||
AddAssert("1 online user", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.Online)?.Count == 1);
|
||||
AddAssert("2 offline users", () => control.Items.FirstOrDefault(item => item.Status == FriendsOnlineStatus.Offline)?.Count == 2);
|
||||
AddAssert("3 users", () => control.Items.FirstOrDefault(item => item.Status == OnlineStatus.All)?.Count == 3);
|
||||
AddAssert("1 online user", () => control.Items.FirstOrDefault(item => item.Status == OnlineStatus.Online)?.Count == 1);
|
||||
AddAssert("2 offline users", () => control.Items.FirstOrDefault(item => item.Status == OnlineStatus.Offline)?.Count == 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user