Remove redundant setup in template game test scenes

This commit is contained in:
Bartłomiej Dach
2025-01-22 08:43:36 +01:00
parent ce66bc374f
commit 6ef2f54d9a
2 changed files with 4 additions and 15 deletions

View File

@@ -1,5 +1,4 @@
using osu.Framework.Allocation;
using osu.Framework.Platform;
using NUnit.Framework;
namespace TemplateGame.Game.Tests.Visual
@@ -10,15 +9,10 @@ namespace TemplateGame.Game.Tests.Visual
// Add visual tests to ensure correct behaviour of your game: https://github.com/ppy/osu-framework/wiki/Development-and-Testing
// You can make changes to classes associated with the tests and they will recompile and update immediately.
private TemplateGameGame game;
[BackgroundDependencyLoader]
private void load(GameHost host)
private void load()
{
game = new TemplateGameGame();
game.SetHost(host);
AddGame(game);
AddGame(new TemplateGameGame());
}
}
}

View File

@@ -1,5 +1,4 @@
using osu.Framework.Allocation;
using osu.Framework.Platform;
using NUnit.Framework;
namespace FlappyDon.Game.Tests.Visual
@@ -11,14 +10,10 @@ namespace FlappyDon.Game.Tests.Visual
[TestFixture]
public partial class TestSceneFlappyDonGame : FlappyDonTestScene
{
private FlappyDonGame game;
[BackgroundDependencyLoader]
private void load(GameHost host)
private void load()
{
game = new FlappyDonGame();
game.SetHost(host);
AddGame(game);
AddGame(new FlappyDonGame());
}
}
}