コード例 #1
0
        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)
            {
            }
        }
コード例 #2
0
 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);
     }
 }