public async Task GroupMilestonesCanBeRetrieved() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(TestGroupTextId, new CreateGroupMilestoneRequest("milestone1") { StartDate = "2018-11-01", DueDate = "2018-11-30", Description = "description1" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var milestones = await _sut.GetMilestonesAsync(TestGroupId); var milestone = await _sut.GetMilestoneAsync(TestGroupId, createdMilestone.Id); //assert milestones.Should().NotBeEmpty(); milestone.Should().Match <Milestone>(m => m.GroupId == TestGroupId && m.Title == "milestone1" && m.StartDate == "2018-11-01" && m.DueDate == "2018-11-30" && m.Description == "description1"); }
public async Task CreatedGroupMilestoneCanBeUpdated() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(TestGroupTextId, new CreateGroupMilestoneRequest("milestone2") { StartDate = "2018-11-01", DueDate = "2018-11-30", Description = "description2" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var updatedMilestone = await _sut.UpdateMilestoneAsync(TestGroupTextId, createdMilestone.Id, new UpdateGroupMilestoneRequest() { Title = "milestone22", StartDate = "2018-11-05", DueDate = "2018-11-10", Description = "description22" }); //assert updatedMilestone.Should().Match <Milestone>(m => m.GroupId == TestGroupId && m.Title == "milestone22" && m.StartDate == "2018-11-05" && m.DueDate == "2018-11-10" && m.Description == "description22"); }
public async Task ProjectMilestonesRetrieved() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(GitLabApiHelper.TestProjectTextId, new CreateProjectMilestoneRequest("milestone6") { StartDate = "2018-11-01", DueDate = "2018-11-30", Description = "description6" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var milestones = await _sut.GetMilestonesAsync(GitLabApiHelper.TestProjectId); var milestone = await _sut.GetMilestoneAsync(GitLabApiHelper.TestProjectId, createdMilestone.Id); //assert milestones.Should().NotBeEmpty(); milestone.Should().Match <Milestone>(m => m.ProjectId == GitLabApiHelper.TestProjectId && m.Title == "milestone6" && m.StartDate == "2018-11-01" && m.DueDate == "2018-11-30" && m.Description == "description6"); }
public async Task CreatedProjectMilestoneCanBeUpdated() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(GitLabApiHelper.TestProjectTextId, new CreateProjectMilestoneRequest("milestone4") { StartDate = "2018-11-01", DueDate = "2018-11-30", Description = "description4" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var updatedMilestone = await _sut.UpdateMilestoneAsync(GitLabApiHelper.TestProjectTextId, createdMilestone.Id, new UpdateProjectMilestoneRequest() { Title = "milestone23", StartDate = "2018-11-05", DueDate = "2018-11-10", Description = "description23" }); //assert updatedMilestone.Should().Match <Milestone>(m => m.ProjectId == GitLabApiHelper.TestProjectId && m.Title == "milestone23" && m.StartDate == "2018-11-05" && m.DueDate == "2018-11-10" && m.Description == "description23"); }
public async Task CreatedGroupMilestoneCanBeClosed() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(TestGroupTextId, new CreateGroupMilestoneRequest("milestone3") { StartDate = "2018-12-01", DueDate = "2018-12-31", Description = "description3" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var updatedMilestone = await _sut.UpdateMilestoneAsync(TestGroupTextId, createdMilestone.Id, new UpdateGroupMilestoneRequest() { State = UpdatedMilestoneState.Close }); //assert updatedMilestone.Should().Match <Milestone>(i => i.State == MilestoneState.Closed); }
public async Task CreatedProjectMilestoneCanBeClosed() { //arrange var createdMilestone = await _sut.CreateMilestoneAsync(GitLabApiHelper.TestProjectTextId, new CreateProjectMilestoneRequest("milestone5") { StartDate = "2018-12-01", DueDate = "2018-12-31", Description = "description5" }); MilestoneIdsToClean.Add(createdMilestone.Id); //act var updatedMilestone = await _sut.UpdateMilestoneAsync(GitLabApiHelper.TestProjectTextId, createdMilestone.Id, new UpdateProjectMilestoneRequest() { State = UpdatedMilestoneState.Close }); //assert updatedMilestone.Should().Match <Milestone>(i => i.State == MilestoneState.Closed); }