mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 05:22:54 +08:00
Fix managed object reused between test runs
This commit is contained in:
parent
8ac886a247
commit
6bf293e130
@ -78,9 +78,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestCollectionRemovedFromDropdown()
|
public void TestCollectionRemovedFromDropdown()
|
||||||
{
|
{
|
||||||
var first = new BeatmapCollection(name: "1");
|
BeatmapCollection first = null!;
|
||||||
|
|
||||||
AddStep("add collection", () => Realm.Write(r => r.Add(first)));
|
AddStep("add collection", () => Realm.Write(r => r.Add(first = new BeatmapCollection(name: "1"))));
|
||||||
AddStep("add collection", () => Realm.Write(r => r.Add(new BeatmapCollection(name: "2"))));
|
AddStep("add collection", () => Realm.Write(r => r.Add(new BeatmapCollection(name: "2"))));
|
||||||
AddStep("remove collection", () => Realm.Write(r => r.Remove(first)));
|
AddStep("remove collection", () => Realm.Write(r => r.Remove(first)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user