Fix some of the tests

This commit is contained in:
pltaylor
2013-11-02 11:57:13 -04:00
parent 0c4cd32a7b
commit d98961188d
2 changed files with 4 additions and 5 deletions
@@ -44,7 +44,7 @@ public class IssueCommentsClientTests
client.GetForRepository("fake", "repo");
connection.Received().GetAll<Issue>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments"),
connection.Received().GetAll<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments"),
Arg.Any<Dictionary<string, string>>());
}
@@ -58,7 +58,6 @@ public class IssueCommentsClientTests
await AssertEx.Throws<ArgumentException>(async () => await client.GetForRepository("", "name"));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForRepository("owner", null));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForRepository("owner", ""));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForRepository("owner", "name"));
}
}
@@ -83,9 +82,9 @@ public class IssueCommentsClientTests
var client = new IssueCommentsClient(connection);
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForIssue(null, "name", 1));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForIssue("", "name", 1));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForIssue("", "name", 1));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForIssue("owner", null, 1));
await AssertEx.Throws<ArgumentNullException>(async () => await client.GetForIssue("owner", "", 1));
await AssertEx.Throws<ArgumentException>(async () => await client.GetForIssue("owner", "", 1));
}
}
+1 -1
View File
@@ -80,7 +80,7 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(newComment, "newComment");
return ApiConnection.Post<IssueComment>(ApiUrls.IssueComment(owner, name, number), newComment);
return ApiConnection.Post<IssueComment>(ApiUrls.IssueComments(owner, name, number), newComment);
}
/// <summary>