Beispiel #1
0
            public async Task EnsuresArguments()
            {
                var client = new ObservableStarredClient(Substitute.For <IGitHubClient>());

                await Assert.ThrowsAsync <ArgumentNullException>(() => client.StarRepo(null, "james").ToTask());

                await Assert.ThrowsAsync <ArgumentNullException>(() => client.StarRepo("james", null).ToTask());
            }
Beispiel #2
0
            public async Task EnsuresArguments()
            {
                var client = new ObservableStarredClient(Substitute.For <IGitHubClient>());

                await AssertEx.Throws <ArgumentException>(async() => await client.StarRepo(null, "james"));

                await AssertEx.Throws <ArgumentException>(async() => await client.StarRepo("james", null));
            }
Beispiel #3
0
            public void ChecksStarredForUser()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableStarredClient(gitHubClient);

                client.StarRepo("jugglingnutcase", "katiejamie");
                gitHubClient.Activity.Starring.Received().StarRepo("jugglingnutcase", "katiejamie");
            }