public async Task EnsuresArguments() { var client = new ObservableStarredClient(Substitute.For<IGitHubClient>()); await AssertEx.Throws<ArgumentException>(async () => await client.RemoveStarFromRepo(null, "james")); await AssertEx.Throws<ArgumentException>(async () => await client.RemoveStarFromRepo("james", null)); }
public async Task ChecksStarredForUser() { var gitHubClient = Substitute.For<IGitHubClient>(); var client = new ObservableStarredClient(gitHubClient); client.RemoveStarFromRepo("jugglingnutcase", "katiejamie"); gitHubClient.Activity.Starring.Received().RemoveStarFromRepo("jugglingnutcase", "katiejamie"); }
public async Task EnsuresArguments() { var client = new ObservableStarredClient(Substitute.For<IGitHubClient>()); await Assert.ThrowsAsync<ArgumentNullException>(() => client.RemoveStarFromRepo(null, "james").ToTask()); await Assert.ThrowsAsync<ArgumentNullException>(() => client.RemoveStarFromRepo("james", null).ToTask()); }