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

                await AssertEx.Throws <ArgumentNullException>(async() => await client.GetUserPerformed(null));

                await AssertEx.Throws <ArgumentException>(async() => await client.GetUserPerformed(""));
            }
Пример #2
0
            public void RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableEventsClient(gitHubClient);

                client.GetUserPerformed("fake");

                gitHubClient.Connection.Received(1).Get <List <Activity> >(new Uri("users/fake/events", UriKind.Relative), null, null);
            }