2020-02-18 04:21:55 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Testing;
|
|
|
|
using osu.Game.Audio;
|
|
|
|
using osu.Game.IO.Archives;
|
|
|
|
using osu.Game.Skinning;
|
|
|
|
using osu.Game.Tests.Resources;
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Skins
|
|
|
|
{
|
|
|
|
[HeadlessTest]
|
|
|
|
public class TestSceneSkinResources : OsuTestScene
|
|
|
|
{
|
|
|
|
[Resolved]
|
|
|
|
private SkinManager skins { get; set; }
|
|
|
|
|
|
|
|
private ISkin skin;
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
var imported = skins.Import(new ZipArchiveReader(TestResources.OpenResource("Archives/ogg-skin.osk"))).Result;
|
2021-09-30 10:33:12 +00:00
|
|
|
skin = skins.GetSkin(imported.Value);
|
2020-02-18 04:21:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => skin.GetSample(new SampleInfo("sample")) != null);
|
|
|
|
}
|
|
|
|
}
|