1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 16:03:01 +08:00

Add some more testing.

This commit is contained in:
miterosan 2018-07-30 00:13:32 +02:00
parent b1e9a4fd24
commit 8bccecc2e5

View File

@ -74,9 +74,13 @@ namespace osu.Game.Tests.Visual
channelTabControl.OnRequestLeave += channel => channelTabControl.RemoveChannel(channel); channelTabControl.OnRequestLeave += channel => channelTabControl.RemoveChannel(channel);
channelTabControl.Current.ValueChanged += channel => currentText.Text = "Currently selected channel: " + channel.ToString(); channelTabControl.Current.ValueChanged += channel => currentText.Text = "Currently selected channel: " + channel.ToString();
AddStep("Add random user", addRandomUser); AddStep("Add random private channel", addRandomUser);
AddRepeatStep("Add 3 random users", addRandomUser, 3); AddAssert("There is only one channels", () => channelTabControl.Items.Count() == 2);
AddStep("Add random channel", () => addChannel(RNG.Next().ToString())); AddRepeatStep("Add 3 random private channels", addRandomUser, 3);
AddAssert("There are four channels", () => channelTabControl.Items.Count() == 5);
AddStep("Add random public channel", () => addChannel(RNG.Next().ToString()));
AddRepeatStep("Select a random channel", () => channelTabControl.Current.Value = channelTabControl.Items.ElementAt(RNG.Next(channelTabControl.Count + 1)), 20);
} }
private List<User> users; private List<User> users;