1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

TestCase improvement

This commit is contained in:
Andrei Zavatski 2019-08-04 15:00:02 +03:00
parent 3ae5428dad
commit cd7b6d2d27

View File

@ -10,6 +10,7 @@ using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko;
using osu.Game.Users;
using osu.Framework.Bindables;
namespace osu.Game.Tests.Visual.Online
{
@ -24,11 +25,13 @@ namespace osu.Game.Tests.Visual.Online
public TestSceneProfileRulesetSelector()
{
ProfileRulesetSelector selector;
Bindable<User> user = new Bindable<User>();
Child = selector = new ProfileRulesetSelector
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
User = { BindTarget = user }
};
AddStep("set osu! as default", () => selector.SetDefaultRuleset(new OsuRuleset().RulesetInfo));
@ -36,11 +39,11 @@ namespace osu.Game.Tests.Visual.Online
AddStep("set taiko as default", () => selector.SetDefaultRuleset(new TaikoRuleset().RulesetInfo));
AddStep("set catch as default", () => selector.SetDefaultRuleset(new CatchRuleset().RulesetInfo));
AddStep("User with osu as default", () => selector.User.Value = new User { PlayMode = "osu" });
AddStep("User with mania as default", () => selector.User.Value = new User { PlayMode = "mania" });
AddStep("User with taiko as default", () => selector.User.Value = new User { PlayMode = "taiko" });
AddStep("User with catch as default", () => selector.User.Value = new User { PlayMode = "fruits" });
AddStep("null user", () => selector.User.Value = null);
AddStep("User with osu as default", () => user.Value = new User { PlayMode = "osu" });
AddStep("User with mania as default", () => user.Value = new User { PlayMode = "mania" });
AddStep("User with taiko as default", () => user.Value = new User { PlayMode = "taiko" });
AddStep("User with catch as default", () => user.Value = new User { PlayMode = "fruits" });
AddStep("null user", () => user.Value = null);
}
}
}