public void ShouldDeleteProfile() { var profile = new Profile { Id = Guid.NewGuid(), Login = "******", Avatar = Guid.NewGuid(), Password = "******", Name = "odmin", Surname = "odmin" }; var repository = new ProfilesRepository(Constants.Constants.ConnectionString); repository.CreateProfile(profile); repository.DeleteProfile(profile.Id); try { repository.GetProfile(profile.Id); } catch (Exception) { } }
public void Clean() { foreach (var login in _tempUsers) { var user = new ProfilesRepository(Constants.Constants.ConnectionString); foreach (var chat in _chats) { new ChatsRepository(Constants.Constants.ConnectionString, user).DeleteChat(chat); } user.DeleteProfile(login); } }