Merge spectrum test case

This commit is contained in:
Salman Ahmed 2021-08-19 07:18:18 +03:00
parent 25e6317e7f
commit 65c0ae757b
1 changed files with 1 additions and 27 deletions

View File

@ -3,7 +3,6 @@
using System.Linq; using System.Linq;
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Utils; using osu.Framework.Utils;
@ -50,32 +49,7 @@ public void TestSpectrum()
{ {
StarRatingDisplay starRating = null; StarRatingDisplay starRating = null;
BindableDouble starRatingNumeric; AddStep("load display", () => Child = starRating = new StarRatingDisplay(new StarDifficulty(5.55, 1), animated: true)
AddStep("load display", () =>
{
Child = starRating = new StarRatingDisplay(new StarDifficulty(5.55, 1))
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(3f),
};
});
AddStep("transform over spectrum", () =>
{
starRatingNumeric = new BindableDouble();
starRatingNumeric.BindValueChanged(val => starRating.Current.Value = new StarDifficulty(val.NewValue, 1));
this.TransformBindableTo(starRatingNumeric, 10, 10000, Easing.OutQuint);
});
}
[Test]
public void TestChangingStarRatingDisplay()
{
StarRatingDisplay starRating = null;
AddStep("load display", () => Child = starRating = new StarRatingDisplay(new StarDifficulty(5.55, 1))
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,