Exemplo n.º 1
0
        public void CreateProject_Name()
        {
            // Arrange
            var teamCityCaller = CreateTeamCityCaller();

            var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller);

            // Act
            Project project = connectedTc.CreateProject(with => with.Name("New Project Name"));

            var data = @"<newProjectDescription name='New Project Name'></newProjectDescription>";

            // Assert
            A.CallTo(() => teamCityCaller.Post(data, HttpContentTypes.ApplicationXml, "/app/rest/projects/", HttpContentTypes.ApplicationJson)).MustHaveHappened();
        }
Exemplo n.º 2
0
        public void CreateProject_Name()
        {
            // Arrange
            var teamCityCaller = CreateTeamCityCaller();

            var connectedTc = new RemoteTc().Connect(_ => _.AsGuest(), teamCityCaller);

            // Act
            Project project = connectedTc.CreateProject(with => with.Name("New Project Name"));

            var data = @"<newProjectDescription name='New Project Name'></newProjectDescription>";

            // Assert
            A.CallTo(() => teamCityCaller.Post(data, HttpContentTypes.ApplicationXml, "/app/rest/projects/", HttpContentTypes.ApplicationJson)).MustHaveHappened();
        }