1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 21:43:22 +08:00

Update usages of CleanRunHeadlessGameHost to match new signature

This commit is contained in:
Dean Herbert 2021-12-24 20:17:20 +09:00
parent 8cdad5f4d9
commit 4b88e257e5
6 changed files with 31 additions and 31 deletions

View File

@ -40,7 +40,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportWhenClosed()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -57,7 +57,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportThenDelete()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -78,7 +78,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportThenDeleteFromStream()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -114,7 +114,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportThenImport()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -140,7 +140,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportThenImportWithReZip()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -192,7 +192,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportThenImportWithChangedHashedFile()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -247,7 +247,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Ignore("intentionally broken by import optimisations")]
public async Task TestImportThenImportWithChangedFile()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -298,7 +298,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportThenImportWithDifferentFilename()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -351,7 +351,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportCorruptThenImport()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -392,7 +392,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestModelCreationFailureDoesntReturn()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -428,7 +428,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestRollbackOnFailure()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -507,7 +507,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportThenDeleteThenImport()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -534,7 +534,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportThenDeleteThenImportWithOnlineIDsMissing()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost($"{nameof(ImportBeatmapTest)}"))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -566,7 +566,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public async Task TestImportWithDuplicateBeatmapIDs()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -621,8 +621,8 @@ namespace osu.Game.Tests.Beatmaps.IO
[NonParallelizable]
public void TestImportOverIPC()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost($"{nameof(ImportBeatmapTest)}-host", true))
using (HeadlessGameHost client = new CleanRunHeadlessGameHost($"{nameof(ImportBeatmapTest)}-client", true))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(true))
using (HeadlessGameHost client = new CleanRunHeadlessGameHost(true))
{
try
{
@ -651,7 +651,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportWhenFileOpen()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -673,7 +673,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportWithDuplicateHashes()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -715,7 +715,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportNestedStructure()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -760,7 +760,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestImportWithIgnoredDirectoryInArchive()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -814,7 +814,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestUpdateBeatmapInfo()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -844,7 +844,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public async Task TestUpdateBeatmapFile()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -888,7 +888,7 @@ namespace osu.Game.Tests.Beatmaps.IO
public void TestSaveRemovesInvalidCharactersFromPath()
{
// unfortunately for the time being we need to reference osu.Framework.Desktop for a game host here.
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -922,7 +922,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public void TestCreateNewEmptyBeatmap()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{
@ -949,7 +949,7 @@ namespace osu.Game.Tests.Beatmaps.IO
[Test]
public void TestCreateNewBeatmapWithObject()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(ImportBeatmapTest)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{

View File

@ -30,7 +30,7 @@ namespace osu.Game.Tests.Database
protected void RunTestWithRealm(Action<RealmContextFactory, OsuStorage> testAction, [CallerMemberName] string caller = "")
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(caller))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(callingMethodName: caller))
{
host.Run(new RealmTestGame(() =>
{
@ -54,7 +54,7 @@ namespace osu.Game.Tests.Database
protected void RunTestWithRealmAsync(Func<RealmContextFactory, Storage, Task> testAction, [CallerMemberName] string caller = "")
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(caller))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(callingMethodName: caller))
{
host.Run(new RealmTestGame(async () =>
{

View File

@ -315,7 +315,7 @@ namespace osu.Game.Tests.NonVisual
public CustomTestHeadlessGameHost([CallerMemberName] string callingMethodName = @"")
: base(callingMethodName: callingMethodName)
{
string defaultStorageLocation = getDefaultLocationFor(callingMethodName);
string defaultStorageLocation = getDefaultLocationFor(Name);
InitialStorage = new DesktopStorage(defaultStorageLocation, this);
InitialStorage.DeleteDirectory(string.Empty);

View File

@ -319,7 +319,7 @@ namespace osu.Game.Tests.Skins.IO
private async Task runSkinTest(Func<OsuGameBase, Task> action, [CallerMemberName] string callingMethodName = @"")
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(callingMethodName))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(callingMethodName: callingMethodName))
{
try
{

View File

@ -17,7 +17,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
[Test]
public void TestDefaultDirectory()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestDefaultDirectory)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{

View File

@ -15,7 +15,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
[Test]
public void TestUnavailableRuleset()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestUnavailableRuleset)))
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
{
try
{