Inheritance: IBuildConfigs
        public void Update_Name_PutCalled()
        {
            // Arrange
            var teamCityCaller = A.Fake<ITeamCityCaller>();
            var buildConfigs = new BuildConfigs(teamCityCaller);

            // Act
            buildConfigs.UpdateName(BuildTypeLocator.WithId("bt2"), "SOME NEW NAME");

            // Assert
            A.CallTo(() => teamCityCaller.PutFormat("SOME NEW NAME", HttpContentTypes.TextPlain, "/app/rest/buildTypes/{0}/name", A<object[]>.Ignored))
                .MustHaveHappened(Repeated.Exactly.Once);
        }
        public void TriggerBuildConfiguration_BuildConfigId_PostFormatCalledWithProperBody()
        {
            // Arrange
            var teamCityCaller = A.Fake<ITeamCityCaller>();
            var buildConfigs = new BuildConfigs(teamCityCaller);

            // Act
            buildConfigs.TriggerBuildConfiguration("buildConfigId");

            // Assert
            A.CallTo(() => teamCityCaller.PostFormat(@"<build>
            <buildType id=""buildConfigId""/>
            </build>
            ", HttpContentTypes.ApplicationXml, "/app/rest/buildQueue"))
                .MustHaveHappened(Repeated.Exactly.Once);
        }
        public void TriggerBuildConfiguration_OnePropertyAgent_PostFormatCalledWithProperBody()
        {
            // Arrange
            var teamCityCaller = A.Fake<ITeamCityCaller>();
            var buildConfigs = new BuildConfigs(teamCityCaller);

            // Act
            buildConfigs.TriggerBuildConfiguration("buildConfigId", 9, new[]{ new Property { Name ="att1", Value = "val1"} });

            // Assert
            A.CallTo(() => teamCityCaller.PostFormat(@"<build>
            <buildType id=""buildConfigId""/>
            <agent id=""9""/>
            <properties>
            <property name=""att1"" value=""val1""/>
            </properties>
            </build>
            ", HttpContentTypes.ApplicationXml, "/app/rest/buildQueue"))
                .MustHaveHappened(Repeated.Exactly.Once);
        }