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

                Assert.Throws <ArgumentNullException>(() => client.GetAllForRepository(42, null));
            }
コード例 #2
0
            public void RequestsCorrectUrl()
            {
                var gitHub = Substitute.For <IGitHubClient>();
                var client = new ObservableRepositoryInvitationsClient(gitHub);

                client.GetAllForRepository(42);

                gitHub.Received().Repository.Invitation.GetAllForRepository(42);
            }