public void RequestsCorrectUrl() { var endpoint = new Uri("notifications/threads/1/subscription", UriKind.Relative); var connection = Substitute.For <IConnection>(); var gitHubClient = new GitHubClient(connection); var client = new ObservableNotificationsClient(gitHubClient); var data = new NewThreadSubscription(); client.SetThreadSubscription(1, data); connection.Received().Put <ThreadSubscription>(endpoint, data); }
public async Task EnsuresNonNullArguments() { var client = new ObservableNotificationsClient(Substitute.For <IGitHubClient>()); Assert.Throws <ArgumentNullException>(() => client.SetThreadSubscription(1, null)); }