public async Task TestConnectRemoteNotCalledWithAttachToCoreAsync(
            [Values] bool stadiaPlatformAvailable)
        {
            var connectRemoteRecorder = new PlatformFactoryFakeConnectRecorder();
            var launcherFactory       =
                CreateLauncherFactory(stadiaPlatformAvailable, connectRemoteRecorder);
            var launcher = launcherFactory.Create(_debugEngine, LaunchOption.AttachToCore,
                                                  "some/core/path", "", "", _gameLaunch);
            ILldbAttachedProgram program = await LaunchAsync(launcher);

            Assert.That(connectRemoteRecorder.InvocationCount, Is.EqualTo(0));
            Assert.That(program, Is.Not.Null);
            program.Stop();
        }
        public async Task TestConnectRemoteCalledForLinuxWithCorrectUrlAsync(
            LaunchOption launchOption)
        {
            var connectRemoteRecorder = new PlatformFactoryFakeConnectRecorder();
            var launcherFactory       = CreateLauncherFactory(false, connectRemoteRecorder);
            var launcher = launcherFactory.Create(_debugEngine, launchOption, "", _gameBinary,
                                                  _gameBinary, _gameLaunch);
            ILldbAttachedProgram program = await LaunchAsync(launcher);

            Assert.That(connectRemoteRecorder.InvocationCount, Is.EqualTo(1));
            Assert.That(connectRemoteRecorder.InvocationOptions[0].GetUrl(),
                        Is.EqualTo("connect://localhost:10200"));
            Assert.That(program, Is.Not.Null);
            program.Stop();
        }
        public async Task TestConnectRemoteCalledForStadiaWithScpCommandAsExtraArgAsync(
            LaunchOption launchOption)
        {
            var connectRemoteRecorder = new PlatformFactoryFakeConnectRecorder();
            var launcherFactory       = CreateLauncherFactory(true, connectRemoteRecorder);
            var launcher = launcherFactory.Create(_debugEngine, launchOption, "", _gameBinary,
                                                  _gameBinary, _gameLaunch);
            ILldbAttachedProgram program = await LaunchAsync(launcher);

            Assert.That(connectRemoteRecorder.InvocationCount, Is.EqualTo(1));
            Assert.That(connectRemoteRecorder.InvocationOptions.Count, Is.EqualTo(1));

            string connectRemoteUrl = connectRemoteRecorder.InvocationOptions[0].GetUrl();

            // argument for ConnectRemote should start with a standard value, ending with ';'
            // used as a separator between it and scp command.
            Assert.That(connectRemoteUrl, Does.StartWith("connect://localhost:10200;"));
            // path to the scp.exe should be quoted, to check this we add \" to the assertion.
            Assert.That(connectRemoteUrl, Does.Contain("scp.exe\""));
            Assert.That(connectRemoteUrl,
                        Does.Contain("-oStrictHostKeyChecking=yes -oUserKnownHostsFile"));
            Assert.That(program, Is.Not.Null);
            program.Stop();
        }