osu/osu.Game.Rulesets.Catch.Tests/TestSceneCatchPlayerLegacyS...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2021-05-15 15:02:38 +00:00
using System.Linq;
using NUnit.Framework;
2021-05-15 15:02:38 +00:00
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Skinning;
using osu.Game.Tests.Visual;
2021-05-15 15:02:38 +00:00
using osuTK;
namespace osu.Game.Rulesets.Catch.Tests
{
[TestFixture]
2020-12-01 00:49:04 +00:00
public partial class TestSceneCatchPlayerLegacySkin : LegacySkinPlayerTestScene
{
protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
2021-05-15 15:02:38 +00:00
[Test]
public void TestLegacyHUDComboCounterNotExistent([Values] bool withModifiedSkin)
2021-05-15 15:02:38 +00:00
{
if (withModifiedSkin)
{
AddStep("change component scale", () => Player.ChildrenOfType<LegacyScoreCounter>().First().Scale = new Vector2(2f));
AddStep("update target", () => Player.ChildrenOfType<SkinnableContainer>().ForEach(LegacySkin.UpdateDrawableTarget));
2021-05-15 15:02:38 +00:00
AddStep("exit player", () => Player.Exit());
CreateTest();
2021-05-15 15:02:38 +00:00
}
AddAssert("legacy HUD combo counter not added", () => !Player.ChildrenOfType<LegacyDefaultComboCounter>().Any());
2021-05-15 15:02:38 +00:00
}
}
}