public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.GetLatest("fake", "repo");

                gitHubClient.Repository.Release.Received(1).GetLatest("fake", "repo");
            }
            public void EnsuresNonNullArguments()
            {
                var releasesClient = new ObservableReleasesClient(Substitute.For<IGitHubClient>());

                Assert.Throws<ArgumentNullException>(() => releasesClient.GetLatest(null, "name"));
                Assert.Throws<ArgumentException>(() => releasesClient.GetLatest("", "name"));
                Assert.Throws<ArgumentNullException>(() => releasesClient.GetLatest("owner", null));
                Assert.Throws<ArgumentException>(() => releasesClient.GetLatest("owner", ""));
            }
            public void RequestsTheCorrectUrlWithRepositoryId()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.GetLatest(1);

                gitHubClient.Repository.Release.Received(1).GetLatest(1);
            }