Skip to content

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

@borismod

Description

@borismod

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") );
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions