Refactor warning to notice in method names and usages

This commit is contained in:
Dean Herbert
2022-06-01 16:51:34 +09:00
parent f7110116de
commit 42598ce22a
6 changed files with 24 additions and 24 deletions

View File

@ -84,7 +84,7 @@ namespace osu.Game.Tests.Visual.Settings
AddStep("clear label", () => textBox.LabelText = default);
AddAssert("default value button centre aligned to control size", () => Precision.AlmostEquals(restoreDefaultValueButton.Parent.DrawHeight, control.DrawHeight, 1));
AddStep("set warning text", () => textBox.SetWarningText("This is some very important warning text! Hopefully it doesn't break the alignment of the default value indicator..."));
AddStep("set warning text", () => textBox.SetNoticeText("This is some very important warning text! Hopefully it doesn't break the alignment of the default value indicator...", true));
AddAssert("default value button centre aligned to control size", () => Precision.AlmostEquals(restoreDefaultValueButton.Parent.DrawHeight, control.DrawHeight, 1));
}
@ -132,16 +132,16 @@ namespace osu.Game.Tests.Visual.Settings
AddStep("create settings item", () => Child = numberBox = new SettingsNumberBox());
AddAssert("warning text not created", () => !numberBox.ChildrenOfType<LinkFlowContainer>().Any());
AddStep("set warning text", () => numberBox.SetWarningText("this is a warning!"));
AddStep("set warning text", () => numberBox.SetNoticeText("this is a warning!", true));
AddAssert("warning text created", () => numberBox.ChildrenOfType<LinkFlowContainer>().Single().Alpha == 1);
AddStep("unset warning text", () => numberBox.ClearWarningText());
AddStep("unset warning text", () => numberBox.ClearNoticeText());
AddAssert("warning text hidden", () => !numberBox.ChildrenOfType<LinkFlowContainer>().Any());
AddStep("set warning text again", () => numberBox.SetWarningText("another warning!"));
AddStep("set warning text again", () => numberBox.SetNoticeText("another warning!", true));
AddAssert("warning text shown again", () => numberBox.ChildrenOfType<LinkFlowContainer>().Single().Alpha == 1);
AddStep("set non warning text", () => numberBox.SetWarningText("you did good!", false));
AddStep("set non warning text", () => numberBox.SetNoticeText("you did good!"));
}
}
}