Remove now unnecessary (duplicating) test

This commit is contained in:
smoogipoo 2021-04-16 18:21:56 +09:00
parent 377e5ce6b3
commit 46d2181d42
1 changed files with 0 additions and 24 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@ -205,29 +204,6 @@ public void TestWatchingBeatmapThatDoesntExistLocally()
AddAssert("screen didn't change", () => Stack.CurrentScreen is SoloSpectator);
}
[Test]
public void OnUserBeganPlayingCallbackInvokedOnNewAdd()
{
bool callbackInvoked = false;
Action<int, SpectatorState> callbackAction = (_, __) => callbackInvoked = true;
AddStep("bind first event", () => testSpectatorStreamingClient.OnUserBeganPlaying += callbackAction);
start();
AddAssert("callback invoked", () => callbackInvoked);
AddStep("reset", () =>
{
testSpectatorStreamingClient.OnUserBeganPlaying -= callbackAction;
callbackInvoked = false;
});
AddStep("bind event with run once immediately", () => testSpectatorStreamingClient.BindUserBeganPlaying(callbackAction, true));
AddAssert("callback invoked", () => callbackInvoked);
// Don't leave the event bound if test run succeeded.
AddStep("reset", () => testSpectatorStreamingClient.OnUserBeganPlaying -= callbackAction);
}
private OsuFramedReplayInputHandler replayHandler =>
(OsuFramedReplayInputHandler)Stack.ChildrenOfType<OsuInputManager>().First().ReplayInputHandler;