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

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

                client.GetAsset(1, 1);

                gitHubClient.Repository.Release.Received(1).GetAsset(1, 1);
            }
            public void CallsIntoClient()
            {
                var gitHubClient = Substitute.For<IGitHubClient>();
                var client = new ObservableReleasesClient(gitHubClient);

                client.GetAsset("fake", "repo", 1);

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

                client.GetAsset("fake", "repo", 1, 1);

                gitHubClient.Connection.GetAsync<ReleaseAsset>(
                    new Uri("repos/fake/repo/releases/1/assets/1", UriKind.Relative), null, null);
            }