mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +08:00
Add asserts to the test scene
This commit is contained in:
parent
708dfa2bdc
commit
41be9b3f8f
@ -36,15 +36,18 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
setMaxPages(200);
|
||||
setCurrentPage(201);
|
||||
});
|
||||
AddAssert("Current equals max", () => pageSelector.CurrentPage.Value == pageSelector.MaxPages.Value);
|
||||
AddStep("200 max pages, current -10", () =>
|
||||
{
|
||||
setMaxPages(200);
|
||||
setCurrentPage(-10);
|
||||
});
|
||||
AddAssert("Current is 1", () => pageSelector.CurrentPage.Value == 1);
|
||||
AddStep("-10 max pages", () =>
|
||||
{
|
||||
setMaxPages(-10);
|
||||
});
|
||||
AddAssert("Current is 1, max is 1", () => pageSelector.CurrentPage.Value == 1 && pageSelector.MaxPages.Value == 1);
|
||||
}
|
||||
|
||||
private void setMaxPages(int maxPages) => pageSelector.MaxPages.Value = maxPages;
|
||||
|
Loading…
Reference in New Issue
Block a user