public async Task UpdateAsync_Social_Gets_Added() { var users = await _userRepository.GetAllAsync(); var user = users.FirstOrDefault(); var social = new UserSocial { Site = "Twitter", Url = "@" + user.Username }; user.Socials.Add(social); await _userRepository.UpdateAsync(user); var updated = await _userRepository.GetSingleAsync(user.Username); Assert.True(updated.Socials.Any(s => s.Site == social.Site && s.Url == social.Url)); }
public void Update_Social_Gets_Added() { var user = _userRepository.GetAll().FirstOrDefault(); var social = new UserSocial {Site = "Twitter", Url = "@" + user.Username}; user.Socials.Add(social); _userRepository.Update(user); var updated = _userRepository.GetSingle(user.Username); Assert.True(updated.Socials.Any(s => s.Site == social.Site && s.Url == social.Url)); }