Add failing asserts

This commit is contained in:
Bartłomiej Dach 2020-11-14 20:12:46 +01:00
parent aae59dc3cf
commit 5ae3d6cc74

View File

@ -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)