Replace dodgy SetUpSteps overriding with usage of HasCustomSteps

This commit is contained in:
Dean Herbert
2022-06-28 15:19:02 +09:00
parent 2f264aaf0a
commit 35745c83b7
5 changed files with 19 additions and 30 deletions

View File

@ -39,10 +39,10 @@ namespace osu.Game.Tests.Visual
base.SetUpSteps();
if (!HasCustomSteps)
CreateTest(null);
CreateTest();
}
protected void CreateTest(Action action)
protected void CreateTest([CanBeNull] Action action = null)
{
if (action != null && !HasCustomSteps)
throw new InvalidOperationException($"Cannot add custom test steps without {nameof(HasCustomSteps)} being set.");