Skip to content
This repository was archived by the owner on Feb 12, 2019. It is now read-only.

Commit c5e97ef

Browse files
committed
Added test for project creation
1 parent 9a652af commit c5e97ef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Tests/IntegrationTests/SampleProjectUsage.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ public void it_returns_project_details_when_passing_project()
8383
Project projectDetails = _client.Projects.Details(project);
8484

8585
Assert.That(!string.IsNullOrWhiteSpace(projectDetails.Id));
86+
}
87+
88+
89+
[Test]
90+
public void it_returns_project_details_when_creating_project()
91+
{
92+
var client = new TeamCityClient("localhost:81");
93+
client.Connect("admin", "qwerty");
94+
var projectName = Guid.NewGuid().ToString("N");
95+
var project = client.Projects.Create(projectName);
96+
97+
Assert.That(project, Is.Not.Null);
98+
Assert.That(project.Name, Is.EqualTo(projectName));
8699
}
87100
}
88101
}

0 commit comments

Comments
 (0)