Exemplo n.º 1
0
        public void LaunchInChrome(IChromeClientsLauncher chromeClientsLauncher,
                                   string workingDirectory)
        {
            string         launchUrl;
            StadiaEndpoint endpoint = chromeClientsLauncher.LaunchParams.Endpoint;

            switch (endpoint)
            {
            case StadiaEndpoint.TestClient:
            {
                launchUrl = chromeClientsLauncher.MakeTestClientUrl(LaunchName);
                break;
            }

            case StadiaEndpoint.PlayerEndpoint:
            {
                launchUrl = chromeClientsLauncher.MakePlayerClientUrl(LaunchId);
                break;
            }

            default:
                throw new ArgumentOutOfRangeException(
                          "LaunchInChrome doesn't support this endpoint: " + endpoint);
            }

            chromeClientsLauncher.LaunchGame(launchUrl, workingDirectory);
        }
Exemplo n.º 2
0
 public void Setup()
 {
     _gameletClient         = Substitute.For <IGameletClient>();
     _cancelableTaskFactory = Substitute.For <CancelableTask.Factory>();
     _gameLaunchBeHelper    = Substitute.For <IGameLaunchBeHelper>();
     _metrics        = Substitute.For <IMetrics>();
     _actionRecorder = Substitute.For <ActionRecorder>(_metrics);
     _dialogUtil     = Substitute.For <IDialogUtil>();
     _launcher       = Substitute.For <IChromeClientsLauncher>();
     _params         = new LaunchParams();
     _launcher.LaunchParams.Returns(_params);
 }