Beispiel #1
0
        public void DeleteUserErrorTest()
        {
            ProjectManagerBL tb     = new ProjectManagerBL(dbContext.Object);
            string           result = "";

            try { tb.DeleteUser(3); } catch (Exception ex) { result = ex.Message; }
            Assert.AreEqual(result, "ERROR:User is in use for Task or Project.");
        }
Beispiel #2
0
        public void TestMethod5_DeleteUser()
        {
            UserModel usr = new UserModel()
            {
                EmployeeId = 100, FirstName = "Animesh", LastName = "Singh", UserId = 100
            };
            Mock <IProjectDbService> mock   = new Mock <IProjectDbService>();
            ProjectManagerBL         projBL = new ProjectManagerBL(mock.Object);

            projBL.DeleteUser(usr);
            mock.Verify(c => c.DeleteUser(It.IsAny <Usr>()), Times.Once);
        }
Beispiel #3
0
        public void DeleteUserSuccessTest()
        {
            Users newUser = new Users()
            {
                UserId = 4, EmployeeId = "IT004", FirstName = "Robert", LastName = "Jose"
            };
            ProjectManagerBL tb = new ProjectManagerBL(dbContext.Object);

            tb.AddUser(newUser);

            string result = tb.DeleteUser(10);

            Assert.AreEqual(result, "Users Deleted Successfully");
        }
        // DELETE: api/TaskManager/5
        public void DeleteUser(int id)
        {
            ProjectManagerBL taskManagerBL = new ProjectManagerBL();

            taskManagerBL.DeleteUser(id);
        }
Beispiel #5
0
        public IHttpActionResult DeleteUser(int id)
        {
            ProjectManagerBL obj = new ProjectManagerBL(_db);

            return(Ok(obj.DeleteUser(id)));
        }
Beispiel #6
0
 public void Delete(int id)
 {
     pbl.DeleteUser(id);
 }