mirror of
https://github.com/ppy/osu
synced 2025-01-08 23:29:43 +00:00
Add failing asserts
This commit is contained in:
parent
aae59dc3cf
commit
5ae3d6cc74
@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
public class TestSceneSpinnerApplication : OsuTestScene
|
||||
{
|
||||
[Test]
|
||||
public void TestApplyNewCircle()
|
||||
public void TestApplyNewSpinner()
|
||||
{
|
||||
DrawableSpinner dho = null;
|
||||
|
||||
@ -23,18 +23,23 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
Position = new Vector2(256, 192),
|
||||
IndexInCurrentCombo = 0,
|
||||
Duration = 0,
|
||||
Duration = 500,
|
||||
}))
|
||||
{
|
||||
Clock = new FramedClock(new StopwatchClock())
|
||||
});
|
||||
|
||||
AddStep("rotate some", () => dho.RotationTracker.AddRotation(180));
|
||||
AddAssert("rotation is set", () => dho.RotationTracker.RateAdjustedRotation == 180);
|
||||
|
||||
AddStep("apply new spinner", () => dho.Apply(prepareObject(new Spinner
|
||||
{
|
||||
Position = new Vector2(256, 192),
|
||||
ComboIndex = 1,
|
||||
Duration = 1000,
|
||||
}), null));
|
||||
|
||||
AddAssert("rotation is reset", () => dho.RotationTracker.RateAdjustedRotation == 0);
|
||||
}
|
||||
|
||||
private Spinner prepareObject(Spinner circle)
|
||||
|
Loading…
Reference in New Issue
Block a user