QualiSystems / FluentTc

:ocean: :two_men_holding_hands: :office: Integrate with TeamCity fluently
https://www.nuget.org/packages/fluenttc
Apache License 2.0
44 stars 35 forks source link

Add DownloadArtifacts() method to RemoteTc that accepts lambda #103

Open borismod opened 7 years ago

borismod commented 7 years ago

Feature Request

As a user I would like to be able to download artifacts using fluent API with build locators

Test to reproduce

_Please provide necessary steps for reproduction of this issue_.
[Test]
public void DownloadArtifacts_ByBuildConfiguration_Status()
{
    IList<string> downloadedFiles = new RemoteTc(c => c.ToHost("HOST").AsGuest())
        .DownloadArtifacts(build => build
                .BuildConfiguration(with => with.Id("FluentTc"))
                .Status(BuildStatus.Success),  
            @"C:\DownloadedArtifacts");
}

[Test]
public void DownloadArtifacts_ByBuildId()
{
    IList<string> downloadedFiles = new RemoteTc(c => c.ToHost("HOST").AsGuest())
        .DownloadArtifacts(build => build.Id(12345), @"C:\DownloadedArtifacts");
}