public async System.Threading.Tasks.Task EditTaskAsync_ManageTaskServiceReturns_True() { //Arrange var task = new Task { Id = 1, TeamId = 1, Name = "Task", MemberId = 1, Link = "vk.com", StoryPoints = 3, SprintId = 3 }; _tasksRepository.Setup(x => x.UpdateAsync(It.IsAny <Task>())).ReturnsAsync(true); _tasksRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>())).ReturnsAsync(task); //Act var result = await _manageTasksService.EditTaskAsync(task); //Assert Assert.IsTrue(result); }
public async System.Threading.Tasks.Task EditTaskAsync_ManageTaskServiceReturns_True() { //Arrange Team team = Team.Create(1, "2", "1234", new List <TeamMember>()); var task = Task.Create(1, 1, team, "Task", 3, "vk.com", 3, null); _tasksRepository.Setup(x => x.UpdateAsync(It.IsAny <Task>())).ReturnsAsync(true); _tasksRepository.Setup(x => x.GetByIdAsync(It.IsAny <int>())).ReturnsAsync(task); //Act var result = await _manageTasksService.EditTaskAsync(task); //Assert Assert.IsTrue(result); }