Slightly clean up archive readers + decoders. Read beatmap version into BeatmapInfo.

This commit is contained in:
smoogipooo
2017-04-03 20:26:46 +09:00
parent 91eec9e8fc
commit 19b5555ef2
11 changed files with 61 additions and 73 deletions

View File

@ -7,6 +7,9 @@ using osu.Game.Beatmaps.IO;
using osu.Game.Modes;
using osu.Game.Modes.Osu;
using osu.Game.Tests.Resources;
using osu.Game.Beatmaps.Formats;
using osu.Game.Beatmaps;
using osu.Game.Database;
namespace osu.Game.Tests.Beatmaps.IO
{
@ -53,7 +56,11 @@ namespace osu.Game.Tests.Beatmaps.IO
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
{
var reader = new OszArchiveReader(osz);
var meta = reader.ReadMetadata();
BeatmapMetadata meta;
using (var stream = new StreamReader(reader.GetStream("Soleily - Renatus (Deif) [Platter].osu")))
meta = BeatmapDecoder.GetDecoder(stream).Decode(stream).Metadata;
Assert.AreEqual(241526, meta.OnlineBeatmapSetID);
Assert.AreEqual("Soleily", meta.Artist);
Assert.AreEqual("Soleily", meta.ArtistUnicode);