1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Fixed formatting for tests

This commit is contained in:
Jess Meng 2020-12-14 12:38:59 -08:00
parent ccbf6db810
commit 9cb0ed3b8f

View File

@ -207,18 +207,16 @@ namespace osu.Game.Tests.Visual.Online
AddStep("Click normal close button", () => clickDrawable(((TestChannelTabItem)chatOverlay.TabMap[channel1]).CloseButton.Child));
AddAssert("All channels closed", () => !channelManager.JoinedChannels.Any());
}
private void pressControlW()
{
AddStep("Press and hold Control", () => InputManager.PressKey(Key.ControlLeft));
AddStep("Press W", () => InputManager.Key(Key.W));
AddStep("Release Control", () => InputManager.ReleaseKey(Key.ControlLeft));
}
[Test]
public void TestCtrlWShortcut()
{
AddStep("Join 2 channels", () =>
AddStep("Join 2 channels", () =>
{
channelManager.JoinChannel(channel1);
channelManager.JoinChannel(channel2);
@ -228,7 +226,6 @@ namespace osu.Game.Tests.Visual.Online
AddStep("Select channel 2", () => clickDrawable(chatOverlay.TabMap[channel2]));
pressControlW();
// Channel 2 should be closed
AddAssert("channel 1 open", () => channelManager.JoinedChannels.Contains(channel1));
AddAssert("channel 2 closed", () => !channelManager.JoinedChannels.Contains(channel2));
@ -237,10 +234,8 @@ namespace osu.Game.Tests.Visual.Online
AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1]));
pressControlW();
// Channel 1 and channel 2 should be closed
AddAssert("channel 1 closed", () => !channelManager.JoinedChannels.Contains(channel1));
AddAssert("channel 2 closed", () => !channelManager.JoinedChannels.Contains(channel2));
AddAssert("All channels closed", () => !channelManager.JoinedChannels.Any());
}
private void pressControlT()
@ -253,7 +248,7 @@ namespace osu.Game.Tests.Visual.Online
[Test]
public void TestCtrlTShortcut()
{
AddStep("Join 2 channels", () =>
AddStep("Join 2 channels", () =>
{
channelManager.JoinChannel(channel1);
channelManager.JoinChannel(channel2);