Fix test regressions (incorrect from the start)

This commit is contained in:
Dean Herbert 2019-12-13 20:06:56 +09:00
parent 3dc2b59d2a
commit 7033974733
5 changed files with 14 additions and 9 deletions

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Game.Rulesets.Catch.Mods;
namespace osu.Game.Rulesets.Catch.Tests
@ -12,9 +13,10 @@ namespace osu.Game.Rulesets.Catch.Tests
{
public override IReadOnlyList<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(CatchModHidden) }).ToList();
public TestSceneDrawableHitObjectsHidden()
[SetUp]
public void SetUp() => Schedule(() =>
{
Mods.Value = new[] { new CatchModHidden() };
}
});
}
}

View File

@ -14,9 +14,10 @@ namespace osu.Game.Rulesets.Osu.Tests
{
public override IReadOnlyList<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
public TestSceneHitCircleHidden()
[SetUp]
public void SetUp() => Schedule(() =>
{
Mods.Value = new[] { new OsuModHidden() };
}
});
}
}

View File

@ -14,9 +14,10 @@ namespace osu.Game.Rulesets.Osu.Tests
{
public override IReadOnlyList<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
public TestSceneSliderHidden()
[SetUp]
public void SetUp() => Schedule(() =>
{
Mods.Value = new[] { new OsuModHidden() };
}
});
}
}

View File

@ -14,9 +14,10 @@ namespace osu.Game.Rulesets.Osu.Tests
{
public override IReadOnlyList<Type> RequiredTypes => base.RequiredTypes.Concat(new[] { typeof(OsuModHidden) }).ToList();
public TestSceneSpinnerHidden()
[SetUp]
public void SetUp() => Schedule(() =>
{
Mods.Value = new[] { new OsuModHidden() };
}
});
}
}

View File

@ -124,7 +124,7 @@ namespace osu.Game.Tests.Visual.UserInterface
var easierMods = instance.GetModsFor(ModType.DifficultyReduction);
var noFailMod = easierMods.FirstOrDefault(m => m is OsuModNoFail);
AddStep("set mods externally", () => { modDisplay.Current.Value = new[] { noFailMod }; });
AddStep("set mods externally", () => { Mods.Value = new[] { noFailMod }; });
changeRuleset(rulesetOsu);