Пример #1
0
            public async Task EnsuresArguments()
            {
                var client = new ObservableStarredClient(Substitute.For <IGitHubClient>());

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

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

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

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

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