mirror of https://github.com/ppy/osu
Add test coverage for spinners too
This commit is contained in:
parent
36a234e5d9
commit
dafbeda681
|
@ -88,6 +88,28 @@ public void TestCutPasteSlider()
|
|||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCutPasteSpinner()
|
||||
{
|
||||
var addedObject = new Spinner
|
||||
{
|
||||
StartTime = 1000,
|
||||
Duration = 5000
|
||||
};
|
||||
|
||||
AddStep("add hitobject", () => EditorBeatmap.Add(addedObject));
|
||||
|
||||
AddStep("select added object", () => EditorBeatmap.SelectedHitObjects.Add(addedObject));
|
||||
|
||||
AddStep("cut hitobject", () => Editor.Cut());
|
||||
|
||||
AddStep("paste hitobject", () => Editor.Paste());
|
||||
|
||||
AddAssert("is one object", () => EditorBeatmap.HitObjects.Count == 1);
|
||||
|
||||
AddAssert("duration matches", () => ((Spinner)EditorBeatmap.HitObjects.Single()).Duration == 5000);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCopyPaste()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue