Changed function names in unit tests

This commit is contained in:
Prayank Mathur
2016-03-29 16:59:55 +05:30
parent 63bd1226c9
commit 55f4e72c2d
2 changed files with 22 additions and 22 deletions
+10 -10
View File
@@ -193,7 +193,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For<IApiConnection>();
var client = new IssuesClient(connection);
client.LockIssue("fake", "repo", 42);
client.Lock("fake", "repo", 42);
connection.Received().Put(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/42/lock"));
}
@@ -204,10 +204,10 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For<IApiConnection>();
var client = new IssuesClient(connection);
await Assert.ThrowsAsync<ArgumentNullException>(() => client.LockIssue(null, "name", 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.LockIssue("", "name", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.LockIssue("owner", null, 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.LockIssue("owner", "", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Lock(null, "name", 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.Lock("", "name", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Lock("owner", null, 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.Lock("owner", "", 1));
}
}
@@ -219,7 +219,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For<IApiConnection>();
var client = new IssuesClient(connection);
client.UnlockIssue("fake", "repo", 42);
client.Unlock("fake", "repo", 42);
connection.Received().Delete(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/42/lock"));
}
@@ -230,10 +230,10 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For<IApiConnection>();
var client = new IssuesClient(connection);
await Assert.ThrowsAsync<ArgumentNullException>(() => client.UnlockIssue(null, "name", 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.UnlockIssue("", "name", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.UnlockIssue("owner", null, 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.UnlockIssue("owner", "", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Unlock(null, "name", 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.Unlock("", "name", 1));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.Unlock("owner", null, 1));
await Assert.ThrowsAsync<ArgumentException>(() => client.Unlock("owner", "", 1));
}
}
@@ -345,8 +345,8 @@ public class ObservableIssuesClientTests
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableIssuesClient(gitHubClient);
client.LockIssue("fake", "repo", 42);
gitHubClient.Issue.Received().LockIssue("fake", "repo", 42);
client.Lock("fake", "repo", 42);
gitHubClient.Issue.Received().Lock("fake", "repo", 42);
}
[Fact]
@@ -355,10 +355,10 @@ public class ObservableIssuesClientTests
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableIssuesClient(gitHubClient);
Assert.Throws<ArgumentNullException>(() => client.LockIssue(null, "name", 42));
Assert.Throws<ArgumentException>(() => client.LockIssue("", "name", 42));
Assert.Throws<ArgumentNullException>(() => client.LockIssue("owner", null, 42));
Assert.Throws<ArgumentException>(() => client.LockIssue("owner", "", 42));
Assert.Throws<ArgumentNullException>(() => client.Lock(null, "name", 42));
Assert.Throws<ArgumentException>(() => client.Lock("", "name", 42));
Assert.Throws<ArgumentNullException>(() => client.Lock("owner", null, 42));
Assert.Throws<ArgumentException>(() => client.Lock("owner", "", 42));
}
}
@@ -370,8 +370,8 @@ public class ObservableIssuesClientTests
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableIssuesClient(gitHubClient);
client.UnlockIssue("fake", "repo", 42);
gitHubClient.Issue.Received().UnlockIssue("fake", "repo", 42);
client.Unlock("fake", "repo", 42);
gitHubClient.Issue.Received().Unlock("fake", "repo", 42);
}
[Fact]
@@ -380,10 +380,10 @@ public class ObservableIssuesClientTests
var gitHubClient = Substitute.For<IGitHubClient>();
var client = new ObservableIssuesClient(gitHubClient);
Assert.Throws<ArgumentNullException>(() => client.UnlockIssue(null, "name", 42));
Assert.Throws<ArgumentException>(() => client.UnlockIssue("", "name", 42));
Assert.Throws<ArgumentNullException>(() => client.UnlockIssue("owner", null, 42));
Assert.Throws<ArgumentException>(() => client.UnlockIssue("owner", "", 42));
Assert.Throws<ArgumentNullException>(() => client.Unlock(null, "name", 42));
Assert.Throws<ArgumentException>(() => client.Unlock("", "name", 42));
Assert.Throws<ArgumentNullException>(() => client.Unlock("owner", null, 42));
Assert.Throws<ArgumentException>(() => client.Unlock("owner", "", 42));
}
}