mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Adjust tracker usages to match new API
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// 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 NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
@ -12,7 +13,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
public class TestSceneCreateMultiplayerMatchButton : MultiplayerTestScene
|
||||
{
|
||||
[Cached]
|
||||
private OngoingOperationTracker joiningRoomTracker = new OngoingOperationTracker();
|
||||
private OngoingOperationTracker ongoingOperationTracker = new OngoingOperationTracker();
|
||||
|
||||
private CreateMultiplayerMatchButton button;
|
||||
|
||||
@ -31,12 +32,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
[Test]
|
||||
public void TestButtonEnableStateChanges()
|
||||
{
|
||||
IDisposable joiningRoomOperation = null;
|
||||
|
||||
assertButtonEnableState(true);
|
||||
|
||||
AddStep("begin joining room", () => joiningRoomTracker.BeginOperation());
|
||||
AddStep("begin joining room", () => joiningRoomOperation = ongoingOperationTracker.BeginOperation());
|
||||
assertButtonEnableState(false);
|
||||
|
||||
AddStep("end joining room", () => joiningRoomTracker.EndOperation());
|
||||
AddStep("end joining room", () => joiningRoomOperation.Dispose());
|
||||
assertButtonEnableState(true);
|
||||
|
||||
AddStep("disconnect client", () => Client.Disconnect());
|
||||
|
Reference in New Issue
Block a user