public void RemoveContact_ReturnsFalse_IfContactDoesNotExists()
        {
            var repository = new PhoneBookRepository(_soundexFilter)
            {
                ConnectionString = _connectionString
            };
            repository.SetOwnerGuid(_guid);

            var newContact = new Contact();
            var result = repository.RemoveContact(newContact);

            Assert.False(result);
        }
        public void UpdateContact_ReturnsFalse_IfContactExists_ButUserIsNotRecordOwner()
        {
            var repository = new PhoneBookRepository(_soundexFilter)
            {
                ConnectionString = _connectionString
            };
            repository.SetOwnerGuid(_guid);

            var newContact = new Contact() { Owner = _guid };
            repository.AddContact(newContact);
            repository.SetOwnerGuid(Guid.NewGuid());
            var result = repository.RemoveContact(newContact);

            Assert.False(result);
        }
        public void RemoveContact_RemovesContact_IfContactExists()
        {
            var repository = new PhoneBookRepository(_soundexFilter)
            {
                ConnectionString = _connectionString
            };
            repository.SetOwnerGuid(_guid);

            var newContact = new Contact();
            var contactId = repository.AddContact(newContact);
            repository.RemoveContact(newContact);
            var result = repository.GetContact(contactId);

            Assert.Null(result);
        }