// PUT api/Activity/5
        public IHttpActionResult Put(Mood item)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            try
            {
                return Ok(Logic.Update(item));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Logic.Exists(item.Id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
        public Mood Update(Mood item)
        {
            Repo.Update(item);
            Unit.SaveChanges();
            return item;

        }
        public void MoodRepository()
        {
            Mock<IDbSetFactory> factory = new Mock<IDbSetFactory>();
            Mock<DbSet<Mood>> dbSet = new Mock<DbSet<Mood>>();

            factory.Setup(m => m.CreateDbSet<Mood>()).Returns(dbSet.Object);

            MoodRepository repo = new MoodRepository(factory.Object);

            var Mood = new Mood();

            var sequence = new MockSequence();
            dbSet.InSequence(sequence).Setup(e => e.Add(Mood));
            dbSet.InSequence(sequence).Setup(e => e.Find(Mood.Id));
            dbSet.InSequence(sequence).Setup(e => e.Find(Mood.Id));
            dbSet.InSequence(sequence).Setup(e => e.Find(Mood.Id));
            repo.Create(Mood);
            repo.Get(Mood.Id);
            repo.Update(Mood);
            repo.Delete(Mood.Id);
        }
        public void MoodLogic()
        {
            Mock<IUnitOfWork> uow = new Mock<IUnitOfWork>();
            Mock<IMoodRepository> repo = new Mock<IMoodRepository>();

            MoodLogic logic = new MoodLogic(uow.Object, repo.Object);

            var mood = new Mood();
            var sequence = new MockSequence();
            repo.InSequence(sequence).Setup(r => r.Create(mood));
            repo.InSequence(sequence).Setup(r => r.Update(mood));
            repo.InSequence(sequence).Setup(r => r.Get(mood.Id));
            repo.InSequence(sequence).Setup(r => r.Delete(mood.Id));
            logic.Create(mood);
            logic.Update(mood);
            logic.Get(mood.Id);
            logic.Delete(mood.Id);
        }
 public IHttpActionResult Post(Mood item)
 {
     Mood Created = Logic.Create(item);
     return Ok(Created);
 }
 public Mood Create(Mood item)
 {
     Repo.Create(item);
     Unit.SaveChanges();
     return item;
 }