mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Add more assertions
This commit is contained in:
parent
5f5878e37e
commit
524ff41931
@ -616,8 +616,15 @@ namespace osu.Game.Tests.Beatmaps.IO
|
||||
manager.UpdateFile(setToUpdate, fileToUpdate, stream);
|
||||
}
|
||||
|
||||
Beatmap updatedBeatmap = (Beatmap)manager.GetWorkingBeatmap(manager.QueryBeatmap(b => b.ID == beatmapToUpdate.BeatmapInfo.ID)).Beatmap;
|
||||
// Check that the old file has been dereferenced
|
||||
Assert.That(manager.Files.QueryFiles(f => f.ID == fileToUpdate.FileInfoID).SingleOrDefault(), Is.Null);
|
||||
|
||||
// Ensure that the old file is deleted upon a cleanup
|
||||
manager.Files.Cleanup();
|
||||
Assert.That(new System.IO.FileInfo(manager.Files.Storage.GetFullPath(fileToUpdate.FileInfo.StoragePath)), Does.Not.Exist);
|
||||
|
||||
// Check that the new file is referenced correctly by attempting a retrieval
|
||||
Beatmap updatedBeatmap = (Beatmap)manager.GetWorkingBeatmap(manager.QueryBeatmap(b => b.ID == beatmapToUpdate.BeatmapInfo.ID)).Beatmap;
|
||||
Assert.That(updatedBeatmap.HitObjects.Count, Is.EqualTo(1));
|
||||
Assert.That(updatedBeatmap.HitObjects[0].StartTime, Is.EqualTo(5000));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user