From 72362d92d47e388af4bb9457ed0b963bc1bd77ae Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 8 Jul 2019 16:34:11 +0900 Subject: [PATCH] Fix a few inspections from EAP r# --- osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs | 2 +- osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs | 7 ++++--- .../UserInterface/TestSceneScreenBreadcrumbControl.cs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs b/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs index 364c986723..16e47c5df9 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneChannelTabControl.cs @@ -70,7 +70,7 @@ namespace osu.Game.Tests.Visual.Online }); channelTabControl.OnRequestLeave += channel => channelTabControl.RemoveChannel(channel); - channelTabControl.Current.ValueChanged += channel => currentText.Text = "Currently selected channel: " + channel.NewValue.ToString(); + channelTabControl.Current.ValueChanged += channel => currentText.Text = "Currently selected channel: " + channel.NewValue; AddStep("Add random private channel", addRandomPrivateChannel); AddAssert("There is only one channels", () => channelTabControl.Items.Count() == 2); diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs index 867b3130c9..38a9af05d8 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneBackButton.cs @@ -14,8 +14,6 @@ namespace osu.Game.Tests.Visual.UserInterface { public class TestSceneBackButton : OsuTestScene { - private readonly BackButton button; - public override IReadOnlyList RequiredTypes => new[] { typeof(TwoLayerButton) @@ -23,6 +21,8 @@ namespace osu.Game.Tests.Visual.UserInterface public TestSceneBackButton() { + BackButton button; + Child = new Container { Anchor = Anchor.Centre, @@ -40,11 +40,12 @@ namespace osu.Game.Tests.Visual.UserInterface { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, - Action = () => button.Hide(), } } }; + button.Action = () => button.Hide(); + AddStep("show button", () => button.Show()); AddStep("hide button", () => button.Hide()); } diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs index 9c83fdf96c..0cb8683d72 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneScreenBreadcrumbControl.cs @@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.UserInterface }, }; - breadcrumbs.Current.ValueChanged += screen => titleText.Text = $"Changed to {screen.NewValue.ToString()}"; + breadcrumbs.Current.ValueChanged += screen => titleText.Text = $"Changed to {screen.NewValue}"; breadcrumbs.Current.TriggerChange(); waitForCurrent();