Make incoming Channel target non-nullable

This commit is contained in:
Dean Herbert
2022-11-30 14:30:20 +09:00
parent 69bf0df179
commit b5c514a8f0
2 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ namespace osu.Game.Tests.Visual.Online
{
AddStep("Set activity", () => api.Activity.Value = new UserActivity.InLobby(null));
AddStep("Run command", () => Add(new NowPlayingCommand()));
AddStep("Run command", () => Add(new NowPlayingCommand(new Channel())));
AddAssert("Check correct response", () => postTarget.LastMessage.Contains("is listening"));
}
@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Online
{
AddStep("Set activity", () => api.Activity.Value = new UserActivity.Editing(new BeatmapInfo()));
AddStep("Run command", () => Add(new NowPlayingCommand()));
AddStep("Run command", () => Add(new NowPlayingCommand(new Channel())));
AddAssert("Check correct response", () => postTarget.LastMessage.Contains("is editing"));
}
@ -54,7 +54,7 @@ namespace osu.Game.Tests.Visual.Online
{
AddStep("Set activity", () => api.Activity.Value = new UserActivity.InSoloGame(new BeatmapInfo(), new RulesetInfo()));
AddStep("Run command", () => Add(new NowPlayingCommand()));
AddStep("Run command", () => Add(new NowPlayingCommand(new Channel())));
AddAssert("Check correct response", () => postTarget.LastMessage.Contains("is playing"));
}
@ -70,7 +70,7 @@ namespace osu.Game.Tests.Visual.Online
BeatmapInfo = { OnlineID = hasOnlineId ? 1234 : -1 }
});
AddStep("Run command", () => Add(new NowPlayingCommand()));
AddStep("Run command", () => Add(new NowPlayingCommand(new Channel())));
if (hasOnlineId)
AddAssert("Check link presence", () => postTarget.LastMessage.Contains("/b/1234"));
@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual.Online
AddStep("Add Hidden mod", () => SelectedMods.Value = new[] { Ruleset.Value.CreateInstance().CreateMod<ModHidden>() });
AddStep("Run command", () => Add(new NowPlayingCommand()));
AddStep("Run command", () => Add(new NowPlayingCommand(new Channel())));
AddAssert("Check mod is present", () => postTarget.LastMessage.Contains("+HD"));
}