public async System.Threading.Tasks.Task EditMemberWorkingDaysAsync_ManageMemberWorkingDaysServiceReturnsTrue_ReturnsTrue()
        {
            //Arrange
            Sprint sprint            = Sprint.Create(1, new List <Task>());
            var    memberWorkingDays = MemberWorkingDays.Create(1, 1, 1, sprint, 10);

            _memberWorkingDaysRepository.Setup(x => x.UpdateAsync(It.IsAny <MemberWorkingDays>())).ReturnsAsync(true);
            _memberWorkingDaysRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>())).ReturnsAsync(memberWorkingDays);

            //Act
            var result = await _manageMemberWorkingDaysService.EditMemberWorkingDaysAsync(memberWorkingDays);

            //Assert
            Assert.IsTrue(result);
        }
Esempio n. 2
0
        public async System.Threading.Tasks.Task EditMemberWorkingDaysAsync_ManageMemberWorkingDaysServiceReturnsTrue_ReturnsTrue()
        {
            //Arrange
            var memberWorkingDays = new MemberWorkingDays {
                Id = 1, MemberId = 1, SprintId = 1, WorkingDays = 10
            };

            _memberWorkingDaysRepository.Setup(x => x.UpdateAsync(It.IsAny <MemberWorkingDays>())).ReturnsAsync(true);
            _memberWorkingDaysRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>())).ReturnsAsync(memberWorkingDays);

            //Act
            var result = await _manageMemberWorkingDaysService.EditMemberWorkingDaysAsync(memberWorkingDays);

            //Assert
            Assert.IsTrue(result);
        }