public void AttachBuildConfigurationToTemplate() { // Arrange Action<IBuildConfigurationHavingBuilder> having = _ => _.Name("FluentTc"); var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act connectedTc.AttachBuildConfigurationToTemplate(having, "BuildTemplateId"); // Assert A.CallTo( () => teamCityCaller.Put("BuildTemplateId", HttpContentTypes.TextPlain, "/app/rest/buildTypes/name:FluentTc/template", string.Empty)).MustHaveHappened(); }
public void AttachBuildConfigurationToTemplate() { // Arrange Action <IBuildConfigurationHavingBuilder> having = _ => _.Name("FluentTc"); var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act connectedTc.AttachBuildConfigurationToTemplate(having, "BuildTemplateId"); // Assert A.CallTo( () => teamCityCaller.Put("BuildTemplateId", HttpContentTypes.TextPlain, "/app/rest/buildTypes/name:FluentTc/template", string.Empty)).MustHaveHappened(); }