public void WhenItFindsWorkItemsWithComments()
        {
            var systemLog  = Substitute.For <ISystemLog>();
            var store      = Substitute.For <IAzureDevOpsConfigurationStore>();
            var jsonClient = Substitute.For <IHttpJsonClient>();
            var client     = new AdoApiClient(systemLog, store, jsonClient,
                                              new HtmlConvert(systemLog));

            const string?baseUrl1      = "https://ado";
            const string password1     = "password1";
            const int    buildId       = 16;
            const int    workItemOneId = 24;
            const int    workItemTwoId = 25;
            const string projectName   = "IssueTracker";

            store.GetConnections().Returns(new List <AzureDevOpsConnection>
            {
                new()
                {
                    BaseUrl             = baseUrl1,
                    PersonalAccessToken = password1.ToSensitiveString(),
                    ReleaseNoteOptions  = new ReleaseNoteOptions {
                        ReleaseNotePrefix = "My note:"
                    }
                },
                new()
                {
                    BaseUrl             = "https://anotherado",
                    PersonalAccessToken = "password2".ToSensitiveString()
                }
            });
Exemplo n.º 2
0
        private static IAzureDevOpsConfigurationStore CreateSubstituteStore()
        {
            var store = Substitute.For <IAzureDevOpsConfigurationStore>();

            store.GetConnections().Returns(new List <AzureDevOpsConnection>
            {
                new()
                {
                    BaseUrl            = "http://redstoneblock/DefaultCollection/", PersonalAccessToken = "rumor".ToSensitiveString(),
                    ReleaseNoteOptions = new ReleaseNoteOptions {
                        ReleaseNotePrefix = "= Changelog ="
                    }
                }
            });