public void UpdateProfileName_ItShouldUpdateProfileName_Success() { var userId = new ProfileNameView() { FirstNameEN = "Meshal", SecondNameEN = "Alhammadi", ThirdNameEN = "Alhammadi", LastNameEN = "Alhammadi", FirstNameAR = "مشعل", SecondNameAR = "الحمادي", ThirdNameAR = "الحمادي", LastNameAR = "الحمادي", UserId = 4 }; var mm = _profileService.UpdateProfileNameAsync(userId).Result; Assert.IsTrue(mm.Success); }
/// <summary> /// Creates a success response. /// </summary> /// <param name="profileName">profileName view model.</param> /// <returns>Response.</returns> public ProfileResponse(ProfileNameView profileName) : this(true, ClientMessageConstant.Success, profileName) { }
private ProfileResponse(bool success, string message, ProfileNameView profileName) : base(success, message) { ProfileNameView = profileName; }
public async Task <IActionResult> UpdateProfileNameAsync([FromBody] ProfileNameView model) { var result = await _service.UpdateProfileNameAsync(model); return(Ok(result)); }