public void Update_Update_a_null_tweet_from_database_Returns_false()
        {
            bool actual   = service.Update(null);
            bool expected = false;

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
 public bool Update(Tweet tweet)
 {
     try
     {
         if (tweet == null)
         {
             throw new NullReferenceException("Tweet is null");
         }
         DataAccessLayer.Tweet tweetForDatabase = tweetMapper.MapToDatabaseType(tweet);
         tweetsRepository.Update(tweetForDatabase);
         log.Info("Tweet succesfully updated");
     }
     catch (Exception e)
     {
         log.Error(e.Message);
         return(false);
     }
     return(true);
 }