1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Apply reviews

Also rename the class name to match with the others
This commit is contained in:
Ganendra Afrasya 2019-11-28 20:06:15 +07:00
parent ada8dabf7e
commit af5c5a3000

View File

@ -11,7 +11,7 @@ using osu.Game.Screens.Select;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestCaseFooterButtonMods : OsuTestScene
public class TestSceneFooterButtonMods : OsuTestScene
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.UserInterface
private readonly TestFooterButtonMods footerButtonMods;
public TestCaseFooterButtonMods()
public TestSceneFooterButtonMods()
{
Add(footerButtonMods = new TestFooterButtonMods());
}
@ -29,24 +29,24 @@ namespace osu.Game.Tests.Visual.UserInterface
public void TestIncrementMultiplier()
{
AddStep(@"Add Hidden", () => changeMods(new Mod[] { new OsuModHidden() }));
AddAssert(@"Check Hidden multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"1.06x"));
AddAssert(@"Check Hidden multiplier", () => footerButtonMods.MultiplierText.Text == @"1.06x");
AddStep(@"Add HardRock", () => changeMods(new Mod[] { new OsuModHidden() }));
AddAssert(@"Check HardRock multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"1.06x"));
AddAssert(@"Check HardRock multiplier", () => footerButtonMods.MultiplierText.Text == @"1.06x");
AddStep(@"Add DoubleTime", () => changeMods(new Mod[] { new OsuModDoubleTime() }));
AddAssert(@"Check DoubleTime multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"1.12x"));
AddAssert(@"Check DoubleTime multiplier", () => footerButtonMods.MultiplierText.Text == @"1.12x");
AddStep(@"Add multiple Mods", () => changeMods(new Mod[] { new OsuModDoubleTime(), new OsuModHidden(), new OsuModHidden() }));
AddAssert(@"Check multiple mod multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"1.26x"));
AddAssert(@"Check multiple mod multiplier", () => footerButtonMods.MultiplierText.Text == @"1.26x");
}
[Test]
public void TestDecrementMultiplier()
{
AddStep(@"Add Easy", () => changeMods(new Mod[] { new OsuModEasy() }));
AddAssert(@"Check Easy multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"0.50x"));
AddAssert(@"Check Easy multiplier", () => footerButtonMods.MultiplierText.Text == @"0.50x");
AddStep(@"Add NoFail", () => changeMods(new Mod[] { new OsuModNoFail() }));
AddAssert(@"Check NoFail multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"0.50x"));
AddAssert(@"Check NoFail multiplier", () => footerButtonMods.MultiplierText.Text == @"0.50x");
AddStep(@"Add Multiple Mods", () => changeMods(new Mod[] { new OsuModEasy(), new OsuModNoFail() }));
AddAssert(@"Check multiple mod multiplier", () => footerButtonMods.MultiplierText.Text.Equals(@"0.25x"));
AddAssert(@"Check multiple mod multiplier", () => footerButtonMods.MultiplierText.Text == @"0.25x");
}
[Test]
@ -54,7 +54,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{
AddStep(@"Add mods", () => changeMods(new Mod[] { new OsuModDoubleTime(), new OsuModFlashlight() }));
AddStep(@"Clear selected mod", () => changeMods(Array.Empty<Mod>()));
AddAssert(@"Check empty multiplier", () => footerButtonMods.MultiplierText.Text.Equals(string.Empty));
AddAssert(@"Check empty multiplier", () => string.IsNullOrEmpty(footerButtonMods.MultiplierText.Text));
}
private void changeMods(IReadOnlyList<Mod> mods)