public async System.Threading.Tasks.Task AddTaskAsync_ManageTaskServiceReturns_True() { //Arrange var task = new Task { Id = 1, TeamId = 1, Name = "Task1", Link = "https://github.com/", StoryPoints = 1 }; _tasksRepository.Setup(x => x.InsertAsync(It.IsAny <Task>())).ReturnsAsync(true); //Act var result = await _manageTasksService.AddTaskAsync(task); //Assert Assert.IsTrue(result); }
public async System.Threading.Tasks.Task AddTaskAsync_ManageTaskServiceReturns_True() { //Arrange Team team = Team.Create(1, "2", "1234", new List <TeamMember>()); var task = Task.Create(1, 1, team, "Task1", 1, "https://github.com/", 3, 1); _tasksRepository.Setup(x => x.InsertAsync(It.IsAny <Task>())).ReturnsAsync(true); //Act var result = await _manageTasksService.AddTaskAsync(task); //Assert Assert.IsTrue(result); }