Пример #1
0
        public void EndTaskTest()
        {
            ProjectManagerBL tb     = new ProjectManagerBL(dbContext.Object);
            string           result = tb.EndTask(1);

            dbContext.Verify(x => x.SaveChanges());
            Assert.AreEqual(result, "Task Ended Successfully");

            Tasks confirmResult = tb.GetTaskById(1);

            Assert.AreEqual(confirmResult.IsEnded, true);
        }
        // DELETE: api/TaskManager/5
        public void DeleteTask(int id)
        {
            ProjectManagerBL taskManagerBL = new ProjectManagerBL();

            taskManagerBL.EndTask(id);
        }
Пример #3
0
        public IHttpActionResult EndTask(int id)
        {
            ProjectManagerBL obj = new ProjectManagerBL(_db);

            return(Ok(obj.EndTask(id)));
        }