Beispiel #1
0
        public TestSceneProfileRulesetSelector()
        {
            ProfileRulesetSelector selector;
            var 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));
            AddStep("set mania as default", () => selector.SetDefaultRuleset(new ManiaRuleset().RulesetInfo));
            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", () => 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);
        }
        public TestSceneProfileRulesetSelector()
        {
            ProfileRulesetSelector selector;

            Child = selector = new ProfileRulesetSelector
            {
                Anchor = Anchor.Centre,
                Origin = Anchor.Centre,
            };

            AddStep("set osu! as default", () => selector.SetDefaultRuleset(new OsuRuleset().RulesetInfo));
            AddStep("set mania as default", () => selector.SetDefaultRuleset(new ManiaRuleset().RulesetInfo));
            AddStep("set taiko as default", () => selector.SetDefaultRuleset(new TaikoRuleset().RulesetInfo));
            AddStep("set catch as default", () => selector.SetDefaultRuleset(new CatchRuleset().RulesetInfo));
            AddStep("select default ruleset", selector.SelectDefaultRuleset);
        }