public void PostsToCorrectUrl() { var gitHubClient = Substitute.For <IGitHubClient>(); var client = new ObservableReactionsClient(gitHubClient); client.Delete(13); gitHubClient.Reaction.Received().Delete(13); }
public void RequestsCorrectUrl() { var githubClient = Substitute.For <IGitHubClient>(); var client = new ObservableReactionsClient(githubClient); var newReaction = new NewReaction(ReactionType.Confused); client.CommitComment.Create("fake", "repo", 1, newReaction); githubClient.Received().Reaction.CommitComment.Create("fake", "repo", 1, newReaction); }
public void RequestsCorrectUrlWithRepositoryId() { var githubClient = Substitute.For <IGitHubClient>(); var client = new ObservableReactionsClient(githubClient); var newReaction = new NewReaction(ReactionType.Confused); client.Issue.Create(1, 1, newReaction); githubClient.Received().Reaction.Issue.Create(1, 1, newReaction); }