osu/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModDifficultyAd...

53 lines
1.8 KiB
C#
Raw Normal View History

2020-03-01 05:16:28 +00:00
// 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.
using NUnit.Framework;
2020-03-01 05:16:28 +00:00
using osu.Game.Rulesets.Osu.Mods;
2020-03-02 01:50:41 +00:00
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Tests.Visual;
2020-03-01 05:16:28 +00:00
namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public class TestSceneOsuModDifficultyAdjust : ModTestScene
2020-03-01 05:16:28 +00:00
{
public TestSceneOsuModDifficultyAdjust()
2020-03-02 01:50:41 +00:00
: base(new OsuRuleset())
2020-03-01 05:16:28 +00:00
{
}
2020-03-02 01:50:41 +00:00
[Test]
2020-03-05 01:18:37 +00:00
public void TestNoAdjustment() => CreateModTest(new ModTestCaseData(new OsuModDifficultyAdjust())
2020-03-02 01:50:41 +00:00
{
Autoplay = true,
PassCondition = () => ((ScoreAccessibleTestPlayer)Player).ScoreProcessor.JudgedHits >= 2
});
[Test]
2020-03-05 01:18:37 +00:00
public void TestCircleSize10() => CreateModTest(new ModTestCaseData(new OsuModDifficultyAdjust { CircleSize = { Value = 10 } })
{
Autoplay = true,
PassCondition = () => ((ScoreAccessibleTestPlayer)Player).ScoreProcessor.JudgedHits >= 2
});
[Test]
2020-03-05 01:18:37 +00:00
public void TestApproachRate10() => CreateModTest(new ModTestCaseData(new OsuModDifficultyAdjust { ApproachRate = { Value = 10 } })
{
Autoplay = true,
PassCondition = () => ((ScoreAccessibleTestPlayer)Player).ScoreProcessor.JudgedHits >= 2
});
2020-03-02 01:50:41 +00:00
protected override TestPlayer CreateReplayPlayer(Score score, bool allowFail) => new ScoreAccessibleTestPlayer(score, allowFail);
2020-03-02 01:50:41 +00:00
private class ScoreAccessibleTestPlayer : TestPlayer
{
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
public ScoreAccessibleTestPlayer(Score score, bool allowFail)
: base(score, allowFail)
2020-03-02 01:50:41 +00:00
{
}
}
2020-03-01 05:16:28 +00:00
}
}