public override void SetUpSteps() { base.SetUpSteps(); AddStep("import beatmap", () => { beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait(); importedSet = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First(); }); AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer()); AddStep("load dependencies", () => { client = new TestMultiplayerClient(multiplayerScreen.RoomManager); // The screen gets suspended so it stops receiving updates. Child = client; LoadScreen(dependenciesScreen = new DependenciesScreen(client)); }); AddUntilStep("wait for dependencies screen", () => Stack.CurrentScreen is DependenciesScreen); AddUntilStep("wait for dependencies to start load", () => dependenciesScreen.LoadState > LoadState.NotLoaded); AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded); AddStep("load multiplayer", () => LoadScreen(multiplayerScreen)); AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded); AddUntilStep("wait for lounge to load", () => this.ChildrenOfType <MultiplayerLoungeSubScreen>().FirstOrDefault()?.IsLoaded == true); }
public override void SetUpSteps() { base.SetUpSteps(); AddStep("import beatmap", () => { beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).Wait(); importedSet = beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.All).First(); }); AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer()); AddStep("load dependencies", () => { client = new TestMultiplayerClient(multiplayerScreen.RoomManager); // The screen gets suspended so it stops receiving updates. Child = client; LoadScreen(dependenciesScreen = new DependenciesScreen(client)); }); AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded); AddStep("load multiplayer", () => LoadScreen(multiplayerScreen)); AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded); }
public MultiplayerTestSceneDependencies() { MultiplayerClient = new TestMultiplayerClient(RoomManager); SpectatorClient = CreateSpectatorClient(); CacheAs <MultiplayerClient>(MultiplayerClient); CacheAs <SpectatorClient>(SpectatorClient); }
public MultiplayerTestSceneDependencies() { Client = new TestMultiplayerClient(RoomManager); LookupCache = new TestUserLookupCache(); SpectatorClient = CreateSpectatorClient(); CacheAs <MultiplayerClient>(Client); CacheAs <UserLookupCache>(LookupCache); CacheAs <SpectatorClient>(SpectatorClient); }
public TestMultiplayerRoomContainer() { RelativeSizeAxes = Axes.Both; RoomManager = new TestMultiplayerRoomManager(); Client = new TestMultiplayerClient(RoomManager); OngoingOperationTracker = new OngoingOperationTracker(); AddRangeInternal(new Drawable[] { Client, RoomManager, OngoingOperationTracker, content = new Container { RelativeSizeAxes = Axes.Both } }); }
private void loadMultiplayer() { AddStep("create multiplayer screen", () => multiplayerScreen = new TestMultiplayer()); AddStep("load dependencies", () => { client = new TestMultiplayerClient(multiplayerScreen.RoomManager); // The screen gets suspended so it stops receiving updates. Child = client; LoadScreen(dependenciesScreen = new DependenciesScreen(client)); }); AddUntilStep("wait for dependencies to load", () => dependenciesScreen.IsLoaded); AddStep("load multiplayer", () => LoadScreen(multiplayerScreen)); AddUntilStep("wait for multiplayer to load", () => multiplayerScreen.IsLoaded); }
public TestMultiplayer() { Client = new TestMultiplayerClient((TestMultiplayerRoomManager)RoomManager); }
public DependenciesScreen(TestMultiplayerClient client) { Client = client; }