<commit_before>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Linq;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Skinning.Legacy;
using osu.Game.Skinning;
using osu.Game.Tests.Visual;

namespace osu.Game.Rulesets.Catch.Tests
{
    [TestFixture]
    public class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
    {
        [Test]
        public void TestUsingLegacySkin()
        {
            // check for the existence of a random legacy component to ensure using legacy skin.
            // this should exist in LegacySkinPlayerTestScene but the weird transformer logic below needs to be "fixed" or otherwise first.
            AddAssert("using legacy skin", () => this.ChildrenOfType<LegacyScoreCounter>().Any());
        }

        protected override Ruleset CreatePlayerRuleset() => new TestCatchRuleset();

        private class TestCatchRuleset : CatchRuleset
        {
            public override ISkin CreateLegacySkinProvider(ISkinSource source, IBeatmap beatmap) => new TestCatchLegacySkinTransformer(source);
        }

        private class TestCatchLegacySkinTransformer : CatchLegacySkinTransformer
        {
            public TestCatchLegacySkinTransformer(ISkinSource source)
                : base(source)
            {
            }

            public override Drawable GetDrawableComponent(ISkinComponent component)
            {
                var drawable = base.GetDrawableComponent(component);
                if (drawable != null)
                    return drawable;

                // it shouldn't really matter whether to return null or return this,
                // but returning null skips over the beatmap skin, so this needs to exist to test things properly.
                return Source.GetDrawableComponent(component);
            }
        }
    }
}<commit_msg>Revert "Add failing test case"<commit_after>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Game.Tests.Visual;

namespace osu.Game.Rulesets.Catch.Tests
{
    [TestFixture]
    public class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
    {
        protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
    }
}
{'fraction_non_alphanumeric': 0.07280772325020113, 'fraction_numerical': 0.0, 'mean_word_length': 2.717488789237668, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6986712', 'n_tokens_mistral': 680, 'n_tokens_neox': 660, 'n_words': 202}