示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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
                }
            });
        }
示例#6
0
        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);
        }
示例#7
0
 public TestMultiplayer()
 {
     Client = new TestMultiplayerClient((TestMultiplayerRoomManager)RoomManager);
 }
示例#8
0
 public DependenciesScreen(TestMultiplayerClient client)
 {
     Client = client;
 }