FluentTc icon indicating copy to clipboard operation
FluentTc copied to clipboard

Add GetProject() method to RemoteTc that accepts lambda Id() and Name()

Open borismod opened this issue 9 years ago • 2 comments

Feature Request

As a user of FluentTc I would like to be able retrieve a project by Id or Name using fluent API, i.e. using lambda

From TeamCity REST API documentation: https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-ProjectsandBuildConfiguration/TemplatesLists

Project details: GET http://teamcity:8111/app/rest/projects/projectLocator, where projectLocator can be id:internal_project_id or name:project%20name

Test to reproduce


[Test]
public void GetProject_ById()
{
  var project = new RemoteTc(c=>c.ToHost("HOST").AsGuest())
     .GetProject(project => project.Id("FluentTc") );
}

[Test]
public void GetProject_ByName()
{
  var project = new RemoteTc(c=>c.ToHost("HOST").AsGuest())
     .GetProject(project => project.Name("FluentTc") );
}

borismod avatar Apr 21 '17 19:04 borismod

I could implement this is you are still looking for help.

WiseLordship avatar Jul 06 '17 15:07 WiseLordship

@WiseLordship thanks for your help. I'll review it later on and will update you

borismod avatar Jul 06 '17 20:07 borismod