Fix a few inspections from EAP r#

This commit is contained in:
Dean Herbert
2019-07-08 16:34:11 +09:00
parent ffc3c9f8f6
commit 72362d92d4
3 changed files with 6 additions and 5 deletions

View File

@ -70,7 +70,7 @@ namespace osu.Game.Tests.Visual.Online
}); });
channelTabControl.OnRequestLeave += channel => channelTabControl.RemoveChannel(channel); 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); AddStep("Add random private channel", addRandomPrivateChannel);
AddAssert("There is only one channels", () => channelTabControl.Items.Count() == 2); AddAssert("There is only one channels", () => channelTabControl.Items.Count() == 2);

View File

@ -14,8 +14,6 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
public class TestSceneBackButton : OsuTestScene public class TestSceneBackButton : OsuTestScene
{ {
private readonly BackButton button;
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(TwoLayerButton) typeof(TwoLayerButton)
@ -23,6 +21,8 @@ namespace osu.Game.Tests.Visual.UserInterface
public TestSceneBackButton() public TestSceneBackButton()
{ {
BackButton button;
Child = new Container Child = new Container
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -40,11 +40,12 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Action = () => button.Hide(),
} }
} }
}; };
button.Action = () => button.Hide();
AddStep("show button", () => button.Show()); AddStep("show button", () => button.Show());
AddStep("hide button", () => button.Hide()); AddStep("hide button", () => button.Hide());
} }

View File

@ -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(); breadcrumbs.Current.TriggerChange();
waitForCurrent(); waitForCurrent();