Permalink
Browse files

change to the tests so that they run from Teamcity.codebetter.com - t…

…here are a number of tests that do not pass due to the data they request not being there - they are INTEGRATION TESTS
  • Loading branch information...
stack72 committed Nov 29, 2011
1 parent 3f20e71 commit 88e49f837e26baa7d726753838a215d94fa03917
@@ -15,8 +15,8 @@ public class when_interacting_to_get_agent_details
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -32,8 +32,8 @@ public void it_throws_exception_when_no_host()
[ExpectedException(typeof(WebException))]
public void it_throws_exception_when_host_url_invalid()
{
- var client = new TeamCityClient("test:81");
- client.Connect("admin", "qwerty");
+ var client = new TeamCityClient("teamcity:81");
+ client.Connect("teamcitysharpuser", "qwerty");
var agents = client.AllAgents();
@@ -44,7 +44,7 @@ public void it_throws_exception_when_host_url_invalid()
[ExpectedException(typeof(ArgumentException))]
public void it_throws_exception_when_no_client_connection_made()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
var agents = client.AllAgents();
@@ -59,7 +59,7 @@ public void it_returns_all_agents()
Assert.That(agents.Any(), "No agents were found");
}
- [TestCase("stack-LP")]
+ [TestCase("agent01")]
public void it_returns_last_build_status_for_agent(string agentName)
{
Build lastBuild = _client.LastBuildByAgent(agentName);
@@ -13,8 +13,8 @@ public class when_interations_to_get_build_configuration_details
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -31,7 +31,7 @@ public void it_throws_exception_when_no_url_passed()
public void it_throws_exception_when_host_does_not_exist()
{
var client = new TeamCityClient("test:81");
- client.Connect("admin", "qwerty");
+ client.Connect("teamcitysharpuser", "qwerty");
var builds = client.AllBuildConfigs();
@@ -42,7 +42,7 @@ public void it_throws_exception_when_host_does_not_exist()
[ExpectedException(typeof(ArgumentException))]
public void it_throws_exception_when_no_connection_formed()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
var builds = client.AllBuildConfigs();
@@ -60,7 +60,7 @@ public void it_returns_all_build_types()
[Test]
public void it_returns_build_config_details_by_configuration_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var buildConfig = _client.BuildConfigByConfigurationId(buildConfigId);
Assert.That(buildConfig != null, "Cannot find a build type for that buildId");
@@ -69,7 +69,7 @@ public void it_returns_build_config_details_by_configuration_id()
[Test]
public void it_returns_build_config_details_by_configuration_name()
{
- string buildConfigName = "Debug";
+ string buildConfigName = "Release Build";
var buildConfig = _client.BuildConfigByConfigurationName(buildConfigName);
Assert.That(buildConfig != null, "Cannot find a build type for that buildName");
@@ -78,7 +78,7 @@ public void it_returns_build_config_details_by_configuration_name()
[Test]
public void it_returns_build_configs_by_project_id()
{
- string projectId = "project2";
+ string projectId = "project137";
var buildConfigs = _client.BuildConfigsByProjectId(projectId);
Assert.That(buildConfigs.Any(), "Cannot find a build type for that projectId");
@@ -87,7 +87,7 @@ public void it_returns_build_configs_by_project_id()
[Test]
public void it_returns_build_configs_by_project_name()
{
- string projectName = "TeamCitySharp";
+ string projectName = "YouTrackSharp";
var buildConfigs = _client.BuildConfigsByProjectName(projectName);
Assert.That(buildConfigs.Any(), "Cannot find a build type for that projectName");
@@ -13,8 +13,8 @@ public class when_interacting_to_get_build_status_info
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -33,7 +33,7 @@ public void it_throws_exception_when_host_does_not_exist()
var client = new TeamCityClient("test:81");
client.Connect("admin", "qwerty");
- string buildConfigId = "Local Debug Build";
+ string buildConfigId = "Release Build";
var builds = client.SuccessfulBuildsByBuildConfigId(buildConfigId);
//Assert: Exception
@@ -43,9 +43,9 @@ public void it_throws_exception_when_host_does_not_exist()
[ExpectedException(typeof(ArgumentException))]
public void it_throws_exception_when_no_connection_formed()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
- string buildConfigId = "Local Debug Build";
+ string buildConfigId = "Release Build";
var builds = client.SuccessfulBuildsByBuildConfigId(buildConfigId);
//Assert: Exception
@@ -54,7 +54,7 @@ public void it_throws_exception_when_no_connection_formed()
[Test]
public void it_returns_last_successful_build_by_build_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var build = _client.LastSuccessfulBuildByBuildConfigId(buildConfigId);
Assert.That(build != null, "No successful builds have been found");
@@ -63,7 +63,7 @@ public void it_returns_last_successful_build_by_build_config_id()
[Test]
public void it_returns_last_successful_builds_by_build_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var buildDetails = _client.SuccessfulBuildsByBuildConfigId(buildConfigId);
Assert.That(buildDetails.Any(), "No successful builds have been found");
@@ -72,7 +72,7 @@ public void it_returns_last_successful_builds_by_build_config_id()
[Test]
public void it_returns_last_failed_build_by_build_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var buildDetails = _client.LastFailedBuildByBuildConfigId(buildConfigId);
Assert.That(buildDetails != null, "No failed builds have been found");
@@ -81,7 +81,7 @@ public void it_returns_last_failed_build_by_build_config_id()
[Test]
public void it_returns_all_non_successful_builds_by_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var builds = _client.FailedBuildsByBuildConfigId(buildConfigId);
Assert.That(builds.Any(), "No failed builds have been found");
@@ -90,7 +90,7 @@ public void it_returns_all_non_successful_builds_by_config_id()
[Test]
public void it_returns_last_error_build_by_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var buildDetails = _client.LastErrorBuildByBuildConfigId(buildConfigId);
Assert.That(buildDetails != null, "No errored builds have been found");
@@ -99,7 +99,7 @@ public void it_returns_last_error_build_by_config_id()
[Test]
public void it_returns_all_error_builds_by_config_id()
{
- string buildId = "bt2";
+ string buildId = "bt437";
var builds = _client.ErrorBuildsByBuildConfigId(buildId);
Assert.That(builds.Any(), "No errored builds have been found");
@@ -108,7 +108,7 @@ public void it_returns_all_error_builds_by_config_id()
[Test]
public void it_returns_the_last_build_status_by_build_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var build = _client.LastBuildByBuildConfigId(buildConfigId);
Assert.That(build != null, "No builds for this build config have been found");
@@ -117,7 +117,7 @@ public void it_returns_the_last_build_status_by_build_config_id()
[Test]
public void it_returns_all_builds_by_build_config_id()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
var builds = _client.BuildConfigsByBuildConfigId(buildConfigId);
Assert.That(builds.Any(), "No builds for this build configuration have been found");
@@ -126,46 +126,46 @@ public void it_returns_all_builds_by_build_config_id()
[Test]
public void it_returns_all_builds_by_build_config_id_and_tag()
{
- string buildConfigId = "bt2";
+ string buildConfigId = "bt437";
string tag = "test";
var builds = _client.BuildConfigsByConfigIdAndTag(buildConfigId, tag);
- Assert.That(builds.Any(), "No builds were found for this build id and Tag");
+ Assert.IsNotNull(builds, "No builds were found for this build id and Tag");
}
[Test]
public void it_returns_all_builds_by_username()
{
- string userName = "admin";
+ string userName = "teamcitysharpuser";
var builds = _client.BuildsByUserName(userName);
- Assert.That(builds.Any(), "No builds for this user have been found");
+ Assert.IsNotNull(builds, "No builds for this user have been found");
}
[Test]
public void it_returns_all_non_successful_builds_by_username()
{
- string userName = "admin";
+ string userName = "teamcitysharpuser";
var builds = _client.NonSuccessfulBuildsForUser(userName);
- Assert.That(builds.Any(), "No non successful builds found for this user");
+ Assert.IsNotNull(builds, "No non successful builds found for this user");
}
[Test]
public void it_returns_all_non_successful_build_count_by_username()
{
- string userName = "admin";
- int builds = _client.NonSuccessfulBuildsForUser(userName).Count;
+ string userName = "teamcitysharpuser";
+ var builds = _client.NonSuccessfulBuildsForUser(userName);
- Assert.That(builds > 0, "No non successful builds found for this user");
+ Assert.IsNotNull(builds, "No non successful builds found for this user");
}
[Test]
public void it_returns_all_running_builds()
{
var builds = _client.BuildsByBuildLocator(BuildLocator.RunningBuilds());
- Assert.That(builds.Any(), "There are currently no running builds");
+ Assert.IsNotNull(builds, "There are currently no running builds");
}
}
}
@@ -15,8 +15,8 @@ public class when_interacting_to_get_change_information
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -44,7 +44,7 @@ public void it_returns_exception_when_host_does_not_exist()
[ExpectedException(typeof(ArgumentException))]
public void it_returns_exception_when_no_connection_made()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
var changes = client.AllChanges();
@@ -59,7 +59,7 @@ public void it_returns_all_changes()
Assert.That(changes.Any(), "Cannot find any changes recorded in any of the projects");
}
- [TestCase("102")]
+ [TestCase("42843")]
public void it_returns_change_details_by_change_id(string changeId)
{
Change changeDetails = _client.ChangeDetailsByChangeId(changeId);
@@ -15,8 +15,8 @@ public class when_interacting_to_get_project_details
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -45,7 +45,7 @@ public void it_throws_exception_when_host_does_not_exist()
[ExpectedException(typeof(ArgumentException))]
public void it_throws_exception_when_no_connection_formed()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
var projects = client.AllProjects();
@@ -60,15 +60,15 @@ public void it_returns_all_projects()
Assert.That(projects.Any(), "No projects were found for this server");
}
- [TestCase("project6")]
+ [TestCase("project137")]
public void it_returns_project_details_when_passing_a_project_id(string projectId)
{
Project projectDetails = _client.ProjectById(projectId);
Assert.That(projectDetails != null, "No details found for that specific project");
}
- [TestCase("nPUC")]
+ [TestCase("YouTrackSharp")]
public void it_returns_project_details_when_passing_a_project_name(string projectName)
{
Project projectDetails = _client.ProjectByName(projectName);
@@ -79,7 +79,7 @@ public void it_returns_project_details_when_passing_a_project_name(string projec
[Test]
public void it_returns_project_details_when_passing_project()
{
- var project = new Project { Id = "project6" };
+ var project = new Project { Id = "project137" };
Project projectDetails = _client.ProjectDetails(project);
Assert.That(!string.IsNullOrWhiteSpace(projectDetails.Id));
@@ -15,8 +15,8 @@ public class when_interacting_to_get_server_info
[SetUp]
public void SetUp()
{
- _client = new TeamCityClient("localhost:81");
- _client.Connect("admin", "qwerty");
+ _client = new TeamCityClient("teamcity.codebetter.com");
+ _client.Connect("teamcitysharpuser", "qwerty");
}
[Test]
@@ -44,7 +44,7 @@ public void it_throws_exception_when_host_does_not_exist()
[ExpectedException(typeof(ArgumentException))]
public void it_throws_exception_when_no_connection_formed()
{
- var client = new TeamCityClient("localhost:81");
+ var client = new TeamCityClient("teamcity.codebetter.com");
var plugins = client.AllServerPlugins();
@@ -64,7 +64,7 @@ public void it_returns_all_server_plugins()
{
List<Plugin> plugins = _client.AllServerPlugins();
- Assert.That(plugins.Any(), "Server is not returning a plugin list");
+ Assert.IsNotNull(plugins, "Server is not returning a plugin list");
}
}
}
Oops, something went wrong.

0 comments on commit 88e49f8

Please sign in to comment.