Changes the way the exception is verified

This commit is contained in:
William Barbosa
2015-10-08 20:38:18 -03:00
parent 7dee540afd
commit 64326519ee
2 changed files with 20 additions and 4 deletions
@@ -188,6 +188,25 @@ public class RepositoriesClientTests
}
}
[IntegrationTest]
public async Task ThrowsInvalidGitIgnoreExceptionForInvalidTemplateNames()
{
var github = Helper.GetAuthenticatedClient();
var repoName = Helper.MakeNameWithTimestamp("repo-with-gitignore");
var newRepository = new NewRepository(repoName)
{
AutoInit = true,
GitignoreTemplate = "visualstudio"
};
var thrown = await Assert.ThrowsAsync<InvalidGitIgnoreTemplateException>(
() => github.CreateRepositoryContext(newRepository));
Assert.NotNull(thrown);
}
[IntegrationTest]
public async Task ThrowsRepositoryExistsExceptionForExistingRepository()
{