public async Task EnsuresArgumentsNotNull() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableEventsClient(gitHubClient); await AssertEx.Throws <ArgumentNullException>(async() => await client.GetUserReceived(null)); await AssertEx.Throws <ArgumentException>(async() => await client.GetUserReceived("")); }
public void RequestsCorrectUrl() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableEventsClient(gitHubClient); client.GetUserReceived("fake"); gitHubClient.Connection.Received(1).Get <List <Activity> >(new Uri("users/fake/received_events", UriKind.Relative), null, null); }