mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-09 13:01:36 +00:00
Changed function names in unit tests
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user