public async Task <ChangePersonalInfoResponse> ChangePersonalInfo(ChangePersonalInfoRequest request) { return(await _memberApiProxy.ChangePersonalInfoAsync(request)); }
public void WhenITryToSendPOSTRequestToPlayerControllerEndPoint() { ServiceLayerMockingHelper.MockPlayerCommandsForHttpStatus201(Container); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromPasswordChanged] = await MemberApiProxy.ChangePasswordAsync(new ChangePasswordRequest() { OldPassword = LoggedInPlayerMetadata.Password, NewPassword = TestDataGenerator.GetRandomString(), Username = LoggedInPlayerMetadata.Username })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromPersonalInfoChanged] = await MemberApiProxy.ChangePersonalInfoAsync(new ChangePersonalInfoRequest() { PlayerId = PlayerId, FirstName = TestDataGenerator.GetRandomString(), LastName = TestDataGenerator.GetRandomString(), Email = TestDataGenerator.GetRandomEmail(), CurrencyCode = "CAD", DateOfBirth = DateTime.UtcNow.AddYears(-30).ToString("yyyy/MM/dd"), Gender = "Male", Title = "Mr", CountryCode = TestDataGenerator.GetRandomCountryCode(), MailingAddressCity = TestDataGenerator.GetRandomString(), MailingAddressLine1 = TestDataGenerator.GetRandomString(), MailingAddressPostalCode = TestDataGenerator.GetRandomNumber(1000).ToString(), PhoneNumber = TestDataGenerator.GetRandomPhoneNumber(), AccountAlertEmail = false, AccountAlertSms = true, MarketingAlertEmail = true, MarketingAlertPhone = false, MarketingAlertSms = false })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromContactInfoChanged] = await MemberApiProxy.ChangeContactInfoAsync(new ChangeContactInfoRequest() { PlayerId = PlayerId, MailingAddressCity = TestDataGenerator.GetRandomString(), PhoneNumber = TestDataGenerator.GetRandomPhoneNumber(false), CountryCode = LoggedInPlayerMetadata.Country, MailingAddressLine1 = TestDataGenerator.GetRandomString(), MailingAddressPostalCode = TestDataGenerator.GetRandomNumber(1000).ToString() })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromSelfExclusion] = await MemberApiProxy.SelfExclude(new SelfExclusionRequest() { Option = (int)PlayerEnums.SelfExclusion._1Year, PlayerId = PlayerId })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromTimeOut] = await MemberApiProxy.TimeOut(new TimeOutRequest() { PlayerId = PlayerId, Option = (int)PlayerEnums.TimeOut.Month })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromChangedSecurityQuestion] = await MemberApiProxy.ChangeSecurityQuestionAsync(new ChangeSecurityQuestionRequest() { Id = PlayerId.ToString(), SecurityAnswer = TestDataGenerator.GetRandomString(), SecurityQuestionId = LoggedInPlayerMetadata.SecurityQuestion })); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromMobilePhoneVerification] = await MemberApiProxy.VerificationCodeAsync(new VerificationCodeRequest())); Assert.DoesNotThrow(async() => ScenarioContext.Current[ResponseFromMobilePhoneVerified] = await MemberApiProxy.VerifyMobileAsync(new VerifyMobileRequest())); }