mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Change to fluent assertions
This commit is contained in:
@ -4,7 +4,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Utils;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
@ -51,7 +50,7 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
};
|
};
|
||||||
scoreProcessor.ApplyResult(judgementResult);
|
scoreProcessor.ApplyResult(judgementResult);
|
||||||
|
|
||||||
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value));
|
Assert.That(scoreProcessor.TotalScore.Value, Is.EqualTo(expectedScore).Within(0.5d));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -118,7 +117,7 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
scoreProcessor.ApplyResult(judgementResult);
|
scoreProcessor.ApplyResult(judgementResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value, 0.5));
|
Assert.That(scoreProcessor.TotalScore.Value, Is.EqualTo(expectedScore).Within(0.5d));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
@ -158,7 +157,7 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
};
|
};
|
||||||
scoreProcessor.ApplyResult(lastJudgementResult);
|
scoreProcessor.ApplyResult(lastJudgementResult);
|
||||||
|
|
||||||
Assert.IsTrue(Precision.AlmostEquals(expectedScore, scoreProcessor.TotalScore.Value, 0.5));
|
Assert.That(scoreProcessor.TotalScore.Value, Is.EqualTo(expectedScore).Within(0.5d));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -169,7 +168,7 @@ namespace osu.Game.Tests.Rulesets.Scoring
|
|||||||
scoreProcessor.Mode.Value = scoringMode;
|
scoreProcessor.Mode.Value = scoringMode;
|
||||||
scoreProcessor.ApplyBeatmap(new TestBeatmap(new RulesetInfo()));
|
scoreProcessor.ApplyBeatmap(new TestBeatmap(new RulesetInfo()));
|
||||||
|
|
||||||
Assert.IsTrue(Precision.AlmostEquals(0, scoreProcessor.TotalScore.Value));
|
Assert.That(scoreProcessor.TotalScore.Value, Is.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
[TestCase(HitResult.IgnoreHit, HitResult.IgnoreMiss)]
|
||||||
|
Reference in New Issue
Block a user