public void IncludeAll() { // Arrange + Act var changesIncludeBuilder = new ChangesIncludeBuilder(); changesIncludeBuilder.IncludeComment().IncludeFiles().IncludeVcsRootInstance(); var columns = changesIncludeBuilder.GetColumns(); // Assert columns.Should().Be("id,version,href,username,date,webUrl,comment,files,vcsRootInstance"); }
public void IncludeComment() { // Arrange + Act var changesIncludeBuilder = new ChangesIncludeBuilder(); changesIncludeBuilder.IncludeComment(); var columns = changesIncludeBuilder.GetColumns(); // Assert columns.Should().Be("id,version,href,username,date,webUrl,comment"); }
public List <Change> GetChanges(Action <IChangesHavingBuilder> having, Action <IChangesIncludeBuilder> include) { var changesHavingBuilder = new ChangesHavingBuilder(m_BuildHavingBuilderFactory); having(changesHavingBuilder); var changesIncludeBuilder = new ChangesIncludeBuilder(); include(changesIncludeBuilder); var columns = changesIncludeBuilder.GetColumns(); var locator = changesHavingBuilder.GetLocator(); return(m_TeamCityCaller.GetFormat <ChangesList>(@"/app/rest/changes?locator={0}&fields=change({1})", locator, columns).Change); }
public void ShouldIncludeChanges_True() { // Arrange var buildAdditionalIncludeBuilder = new BuildAdditionalIncludeBuilder(); // Act buildAdditionalIncludeBuilder.IncludeChanges(_ => _.IncludeComment()); var shouldIncludeChanges = buildAdditionalIncludeBuilder.ShouldIncludeChanges; // Assert shouldIncludeChanges.Should().BeTrue(); var changesIncludeBuilder = new ChangesIncludeBuilder(); buildAdditionalIncludeBuilder.ChangesInclude(changesIncludeBuilder); changesIncludeBuilder.GetColumns().Should().Be("id,version,href,username,date,webUrl,comment"); }