mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
@ -1,31 +1,32 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Desktop.VisualTests.Platform;
|
||||
using osu.Framework.GameModes.Testing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePlaySongSelect : TestCase
|
||||
{
|
||||
private BeatmapDatabase db;
|
||||
private TestStorage storage;
|
||||
|
||||
public override string Name => @"Song Select";
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Desktop.VisualTests.Platform;
|
||||
using osu.Framework.GameModes.Testing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Select;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePlaySongSelect : TestCase
|
||||
{
|
||||
private BeatmapDatabase db, oldDb;
|
||||
private TestStorage storage;
|
||||
|
||||
public override string Name => @"Song Select";
|
||||
public override string Description => @"with fake data";
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
oldDb = Dependencies.Get<BeatmapDatabase>();
|
||||
if (db == null)
|
||||
{
|
||||
storage = new TestStorage(@"TestCasePlaySongSelect");
|
||||
db = new BeatmapDatabase(storage);
|
||||
Dependencies.Cache(db, true);
|
||||
|
||||
var sets = new List<BeatmapSetInfo>();
|
||||
|
||||
@ -34,8 +35,13 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
db.Import(sets);
|
||||
}
|
||||
|
||||
Add(new PlaySongSelect(db));
|
||||
Add(new PlaySongSelect());
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
Dependencies.Cache(oldDb, true);
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
private BeatmapSetInfo createTestBeatmapSet(int i)
|
||||
@ -89,6 +95,6 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user