public async Task EnsuresNonNullArguments() { var client = new ObservableFollowersClient(Substitute.For<IGitHubClient>()); await Assert.ThrowsAsync<ArgumentNullException>(() => client.Follow(null).ToTask()); await Assert.ThrowsAsync<ArgumentException>(() => client.Follow("").ToTask()); }
public void FollowFromClientUserFollowers() { var githubClient = Substitute.For<IGitHubClient>(); var client = new ObservableFollowersClient(githubClient); client.Follow("alfhenrik"); githubClient.User.Followers.Received() .Follow("alfhenrik"); }