Esempio n. 1
0
        public async Task CreatedIssueCanBeUpdated()
        {
            //arrange
            var createdIssue = await _sut.CreateAsync(new CreateIssueRequest(TestProjectTextId, "Title1")
            {
                Assignees = new List <int> {
                    1
                },
                Confidential          = true,
                Description           = "Description1",
                Labels                = new[] { "Label1" },
                MilestoneId           = 2,
                DiscussionToResolveId = 3,
                MergeRequestIdToResolveDiscussions = 4
            });

            //act
            var updatedIssue = await _sut.UpdateAsync(new UpdateIssueRequest(TestProjectTextId, createdIssue.Iid)
            {
                Assignees = new List <int> {
                    11
                },
                Confidential = false,
                Description  = "Description11",
                Labels       = new[] { "Label11" },
                Title        = "Title11",
                MilestoneId  = 22
            });

            //assert
            updatedIssue.Should().Match <Issue>(i =>
                                                i.ProjectId == TestProjectTextId &&
                                                i.Confidential == false &&
                                                i.Description == "Description11" &&
                                                i.Labels.SequenceEqual(new[] { "Label11" }) &&
                                                i.Title == "Title11");
        }