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

                Assert.Throws <ArgumentNullException>(() => client.WatchRepo(null, "name", subscription));
                Assert.Throws <ArgumentNullException>(() => client.WatchRepo("owner", null, subscription));
                Assert.Throws <ArgumentException>(() => client.WatchRepo("", "name", subscription));
                Assert.Throws <ArgumentException>(() => client.WatchRepo("owner", "", subscription));
            }
            public void CallIntoClient()
            {
                var gitHub = Substitute.For <IGitHubClient>();
                var client = new ObservableWatchedClient(gitHub);

                client.WatchRepo("owner", "name", new NewSubscription());

                gitHub.Activity.Watching.Received().WatchRepo("owner", "name", Arg.Any <NewSubscription>());
            }
            public void RequestsCorrectUrlWithRepositoryId()
            {
                var gitHub = Substitute.For <IGitHubClient>();
                var client = new ObservableWatchedClient(gitHub);

                client.WatchRepo(1, new NewSubscription());

                gitHub.Activity.Watching.Received().WatchRepo(1, Arg.Any <NewSubscription>());
            }