Esempio n. 1
0
        public void Remove_Remove_a_valid_tweet_from_database_Returns_true()
        {
            bool expected = true;
            bool actual   = service.Remove(tweetsList.FirstOrDefault(x => x.Id == 50));

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public ActionResult Remove(int tweetId)
        {
            //if (tweetBl.Remove(tweet))
            //{
            Tweet tweet = new Tweet
            {
                Id = tweetId
            };

            tweetBl.Remove(tweet);
            log.Info("A tweet has been removed");
            return(RedirectToAction("Index", "User"));
            //}
            //else
            //{
            //    log.Error("Could't remove the tweet");
            //    return RedirectToAction("Error", "Home");
            //}
        }