public void CreateTaskfromrepo()
        {
            mock.Setup(a => a.CreateTask(It.IsAny <Task>())).Returns(1);
            mockuser.Setup(a => a.UpdateUserProjectIdTaskId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())).Returns(true);
            TaskBusiness appBusiness = new TaskBusiness(mock.Object, mockuser.Object);

            var result = appBusiness.CreateTask(new TaskDTO());

            Assert.AreEqual(true, result);
        }
示例#2
0
        public void CreateTask()
        {
            TaskDTO taskDTO = new TaskDTO()
            {
                Task      = "Load Test Task",
                Priority  = 1,
                StartDate = DateTime.Now.Date,
                EndDate   = DateTime.Now.AddDays(1).Date
            };
            TaskBusiness appBusiness = new TaskBusiness(_appRepository, _userData);

            appBusiness.CreateTask(taskDTO);
        }
        public void Create_a_task_from_Repo()
        {
            // Arrange
            mock.Setup(a => a.CreateTask(It.IsAny <Task>())).Returns(1);
            mockUser.Setup(a => a.UpdateUserProjectIdTaskId(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <int>())).Returns(true);
            TaskBusiness appBusiness = new TaskBusiness(mock.Object, mockUser.Object);

            // Act
            var result = appBusiness.CreateTask(new TaskDTO());

            // Assert
            Assert.AreEqual(true, result);
        }