Add return bool to HandleRequest to better trigger failures

This commit is contained in:
Dean Herbert
2021-03-23 18:08:32 +09:00
parent ce452565f4
commit aeff9bd853
11 changed files with 75 additions and 26 deletions

View File

@ -11,6 +11,8 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Testing;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Chat;
using osu.Game.Overlays;
using osu.Game.Overlays.Chat.Selection;
@ -64,6 +66,24 @@ namespace osu.Game.Tests.Visual.Online
});
}
[SetUpSteps]
public void SetUpSteps()
{
AddStep("register request handling", () =>
{
((DummyAPIAccess)API).HandleRequest = req =>
{
switch (req)
{
case JoinChannelRequest _:
return true;
}
return false;
};
});
}
[Test]
public void TestHideOverlay()
{