forked from ppy/osu-queue-score-statistics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGearShiftTest.cs
More file actions
45 lines (38 loc) · 1.45 KB
/
GearShiftTest.cs
File metadata and controls
45 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// 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.Online.API;
using osu.Game.Rulesets.Osu.Difficulty;
using osu.Game.Rulesets.Osu.Mods;
using osu.Server.Queues.ScoreStatisticsProcessor.Models;
using Xunit;
namespace osu.Server.Queues.ScoreStatisticsProcessor.Tests
{
public class GearShiftTest : MedalAwarderTest
{
private readonly Beatmap beatmap;
public GearShiftTest()
{
AddMedal(339);
beatmap = AddBeatmap();
AddBeatmapAttributes<OsuDifficultyAttributes>(beatmap.beatmap_id, mods: [new OsuModDoubleTime()]);
}
[Fact]
public void TestMedalAwarded()
{
SetScoreForBeatmap(beatmap.beatmap_id, s => s.Score.ScoreData.Mods = [new APIMod(new OsuModAlternate())]);
AssertMedalAwarded(339);
}
[Fact]
public void TestMedalAwardedWithExtraMods()
{
SetScoreForBeatmap(beatmap.beatmap_id, s => s.Score.ScoreData.Mods = [new APIMod(new OsuModAlternate()), new APIMod(new OsuModDoubleTime())]);
AssertMedalAwarded(339);
}
[Fact]
public void TestMedalNotAwardedIfConversionModsMissing()
{
SetScoreForBeatmap(beatmap.beatmap_id, s => s.Score.ScoreData.Mods = [new APIMod(new OsuModFreezeFrame())]);
AssertNoMedalsAwarded();
}
}
}