FluentTc
FluentTc copied to clipboard
Add GetProject() method to RemoteTc that accepts lambda Id() and Name()
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") );
}
I could implement this is you are still looking for help.
@WiseLordship thanks for your help. I'll review it later on and will update you