1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Inline parameterised test case

This commit is contained in:
Salman Ahmed 2021-08-03 12:49:37 +03:00
parent 0089cdb0ca
commit ea02571da9

View File

@ -14,15 +14,15 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
/// <summary>
/// Ensures that a final volume combo of 0 (i.e. "always muted" mode) constantly plays metronome and completely mutes track.
/// </summary>
[TestCase(0.0, 1.0)]
public void TestZeroFinalCombo(double expectedTrackVolume, double expectedMetronomeVolume) => CreateModTest(new ModTestData
[Test]
public void TestZeroFinalCombo() => CreateModTest(new ModTestData
{
Mod = new OsuModMuted
{
MuteComboCount = { Value = 0 },
},
PassCondition = () => Beatmap.Value.Track.AggregateVolume.Value == expectedTrackVolume &&
Player.ChildrenOfType<Metronome>().SingleOrDefault()?.AggregateVolume.Value == expectedMetronomeVolume,
PassCondition = () => Beatmap.Value.Track.AggregateVolume.Value == 0.0 &&
Player.ChildrenOfType<Metronome>().SingleOrDefault()?.AggregateVolume.Value == 1.0,
});
}
}