Exemple #1
0
            public void EnsuresNonNullArguments()
            {
                var client = new ObservableOrganizationsClient(Substitute.For <IGitHubClient>());

                Assert.Throws <ArgumentNullException>(() => client.Get(null));

                Assert.Throws <ArgumentException>(() => client.Get(""));
            }
Exemple #2
0
            public void RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableOrganizationsClient(gitHubClient);

                client.Get("orgName");

                gitHubClient.Received().Organization.Get("orgName");
            }