public void RequestsCorrectUrl() { var gitHub = Substitute.For<IGitHubClient>(); var client = new ObservableRepositoryInvitationsClient(gitHub); var update = new InvitationUpdate(InvitationPermissionType.Write); client.Edit(42, 43, update); gitHub.Received().Repository.Invitation.Edit(42, 43, update); }
public void EnsureNonNullArguments() { var gitHub = Substitute.For<IGitHubClient>(); var client = new ObservableRepositoryInvitationsClient(gitHub); Assert.Throws<ArgumentNullException>(() => client.Edit(1, 2, null)); }