public async Task GetCurrentGameLaunchSuccessAsync() { _paramsConverter.FullGameLaunchName(null, _testAccount).Returns(_fullLaunchName); GgpGrpc.Models.GameLaunch launch = GetLaunch(_gameLaunchName, GameLaunchState.ReadyToPlay); _gameletClient.GetGameLaunchStateAsync(_fullLaunchName, _action).Returns(launch); GgpGrpc.Models.GameLaunch resultLaunch = await _target.GetCurrentGameLaunchAsync(_testAccount, _action); Assert.That(resultLaunch, Is.EqualTo(launch)); await AssertActionNotRecordedAsync(); }
public async Task <GgpGrpc.Models.GameLaunch> GetCurrentGameLaunchAsync(string testAccount, IAction action) { GgpGrpc.Models.GameLaunch currentGameLaunch; try { currentGameLaunch = await _gameletClient.GetGameLaunchStateAsync( _launchGameParamsConverter.FullGameLaunchName(null, testAccount), action); } catch (CloudException e) when((e.InnerException as RpcException)?.StatusCode == StatusCode.NotFound) { // There is no current launch for the specified account. return(null); } return(currentGameLaunch); }