mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Add request handler for dummy API
This commit is contained in:
@ -8,6 +8,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
@ -28,6 +29,14 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
|
// We blindly mark every request as success so that ChannelManager doesn't remove our channel again.
|
||||||
|
if (API is DummyAPIAccess daa)
|
||||||
|
{
|
||||||
|
daa.HandleRequest = (request) => {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
friend = new User { Id = 0, Username = "Friend" };
|
friend = new User { Id = 0, Username = "Friend" };
|
||||||
publicChannel = new Channel { Id = 1, Name = "osu" };
|
publicChannel = new Channel { Id = 1, Name = "osu" };
|
||||||
privateMessageChannel = new Channel(friend) { Id = 2, Name = friend.Username, Type = ChannelType.PM };
|
privateMessageChannel = new Channel(friend) { Id = 2, Name = friend.Username, Type = ChannelType.PM };
|
||||||
|
Reference in New Issue
Block a user