mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Add test coverage
This commit is contained in:
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
{
|
||||
private readonly DirectoryInfo destination;
|
||||
|
||||
[Resolved]
|
||||
[Resolved(canBeNull: true)]
|
||||
private OsuGame game { get; set; }
|
||||
|
||||
public override bool AllowBackButton => false;
|
||||
@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
|
||||
Beatmap.Value = Beatmap.Default;
|
||||
|
||||
migrationTask = Task.Run(() => game.Migrate(destination.FullName))
|
||||
migrationTask = Task.Run(PerformMigration)
|
||||
.ContinueWith(t =>
|
||||
{
|
||||
if (t.IsFaulted)
|
||||
@ -94,6 +94,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||
});
|
||||
}
|
||||
|
||||
protected virtual void PerformMigration() => game?.Migrate(destination.FullName);
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
Reference in New Issue
Block a user