public void CreateBuildConfiguration_ByName() { // Arrange Action<IBuildProjectHavingBuilder> having = _ => _.Name("OpenSource"); var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act BuildConfiguration buildConfiguration = connectedTc.CreateBuildConfiguration(having, "NewConfig"); // Assert A.CallTo(() => teamCityCaller.Post("NewConfig", HttpContentTypes.TextPlain, "/app/rest/projects/name:OpenSource/buildTypes", HttpContentTypes.ApplicationJson)).MustHaveHappened(); }
public void CreateBuildConfiguration_ByName() { // Arrange Action <IBuildProjectHavingBuilder> having = _ => _.Name("OpenSource"); var teamCityCaller = CreateTeamCityCaller(); var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller); // Act BuildConfiguration buildConfiguration = connectedTc.CreateBuildConfiguration(having, "NewConfig"); // Assert A.CallTo(() => teamCityCaller.Post("NewConfig", HttpContentTypes.TextPlain, "/app/rest/projects/name:OpenSource/buildTypes", HttpContentTypes.ApplicationJson)).MustHaveHappened(); }