1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

Merge pull request #19517 from peppy/add-more-missing-realm-refreshres

Add more missing realm `Refresh()` calls to new beatmap import tests
This commit is contained in:
Dan Balasescu 2022-08-01 17:54:51 +09:00 committed by GitHub
commit 225033c3b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -702,6 +702,8 @@ namespace osu.Game.Tests.Database
var firstImport = await importer.Import(new ImportTask(pathMissingOneBeatmap));
Assert.That(firstImport, Is.Not.Null);
realm.Run(r => r.Refresh());
Assert.That(realm.Realm.All<BeatmapSetInfo>().Where(s => !s.DeletePending), Has.Count.EqualTo(1));
Assert.That(realm.Realm.All<BeatmapSetInfo>().First(s => !s.DeletePending).Beatmaps, Has.Count.EqualTo(11));
@ -709,6 +711,8 @@ namespace osu.Game.Tests.Database
var secondImport = await importer.Import(new ImportTask(pathOriginal));
Assert.That(secondImport, Is.Not.Null);
realm.Run(r => r.Refresh());
Assert.That(realm.Realm.All<BeatmapInfo>(), Has.Count.EqualTo(23));
Assert.That(realm.Realm.All<BeatmapSetInfo>(), Has.Count.EqualTo(2));