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

ParentProjectId not returned #109

Open paulmarshall opened 7 years ago

paulmarshall commented 7 years ago

Bug/Feature Request

The ParentProjectId is not a property of the Project domain class and so not returned when retrieving projects.

This results in the loss of hierarchical links between projects.

Test to reproduce

[TestMethod]
public void GetProjectById_ExistingProject_ReturnsParentProject()
{
  // Arrange
  IConnectedTc connectedTc = cnew RemoteTc().Connect(a => a.ToHost("tc")
     .AsUser("MYUSERNAME", "MYPASSWORD"))

  // Act
  Project project = connectedTc.GetProjectById("FluentTc")

  // Assert
  project.ParentProject.Should().NotBeNull();
  project.ParentProject.Id.Should().NotBeNull();
  project.ParentProject.Name.Should().NotBeNull();
  project.ParentProject.Description.Should().NotBeNull();
}

Affected versions

Product Version
FluentTc 0.0.0.241
TeamCity
Autofac
EasyHttp
SharpZipLib
System.IO.Abstractions
TeamCity.ServiceMessages
borismod commented 7 years ago

@paulmarshall thank you for reporting. You are welcome to contribute the required code. I will review it

robertlyson commented 6 years ago

@paulmarshall are you looking into this or maybe I can grab it?

paulmarshall commented 6 years ago

@robertlyson Go for it