mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Add test scene for hidden mod
This commit is contained in:
parent
6d06066dde
commit
7bb27bfd0e
12
osu.Game.Rulesets.Taiko.Tests/Mods/TaikoModTestScene.cs
Normal file
12
osu.Game.Rulesets.Taiko.Tests/Mods/TaikoModTestScene.cs
Normal file
@ -0,0 +1,12 @@
|
||||
// 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 osu.Game.Tests.Visual;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
{
|
||||
public abstract class TaikoModTestScene : ModTestScene
|
||||
{
|
||||
protected sealed override Ruleset CreatePlayerRuleset() => new TaikoRuleset();
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
// 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 System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Game.Rulesets.Taiko.Mods;
|
||||
|
||||
namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
{
|
||||
public class TestSceneTaikoModHidden : TaikoModTestScene
|
||||
{
|
||||
[Test]
|
||||
public void TestDefaultBeatmapTest() => CreateModTest(new ModTestData
|
||||
{
|
||||
Mod = new TaikoModHidden(),
|
||||
Autoplay = true,
|
||||
PassCondition = checkSomeAutoplayHits
|
||||
});
|
||||
|
||||
private bool checkSomeAutoplayHits()
|
||||
=> Player.ScoreProcessor.JudgedHits >= 4
|
||||
&& Player.Results.All(result => result.Type == result.Judgement.MaxResult);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user