Пример #1
0
        public void GetColumns_IncludeStartDatefinishDateStatusText_Formatted()
        {
            // Arrange
            var buildIncludeBuilder = new BuildIncludeBuilder();

            buildIncludeBuilder.IncludeStartDate().IncludeFinishDate().IncludeStatusText();

            // Act
            var columns = buildIncludeBuilder.GetColumns();

            // Assert
            columns.Should().Be("buildTypeId,href,id,number,state,status,webUrl,startDate,finishDate,statusText");
        }
Пример #2
0
        public void GetColumns_IncludeDefaults_Formatted()
        {
            // Arrange
            var buildIncludeBuilder = new BuildIncludeBuilder();

            buildIncludeBuilder.IncludeDefaults();

            // Act
            var columns = buildIncludeBuilder.GetColumns();

            // Assert
            columns.Should().Be("buildTypeId,href,id,number,state,status,webUrl");
        }
Пример #3
0
        private BuildWrapper GetBuildWrapper(BuildHavingBuilder buildHavingBuilder, CountBuilder countBuilder,
                                             BuildIncludeBuilder buildIncludeBuilder)
        {
            var locator = buildHavingBuilder.GetLocator();
            var count   = countBuilder.GetCount();
            var columns = buildIncludeBuilder.GetColumns();

            if (string.IsNullOrEmpty(count))
            {
                return(m_Caller.GetFormat <BuildWrapper>("/app/rest/builds?locator={0},&fields=count,build({1})", locator,
                                                         columns));
            }

            return(m_Caller.GetFormat <BuildWrapper>("/app/rest/builds?locator={0},{1},&fields=count,build({2})",
                                                     locator, count, columns));
        }