コード例 #1
0
            public void EnsureNonNullArguments()
            {
                var gitHub = Substitute.For <IGitHubClient>();
                var client = new ObservableRepositoryInvitationsClient(gitHub);

                Assert.Throws <ArgumentNullException>(() => client.Edit(1, 2, null));
            }
コード例 #2
0
            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);
            }