Exemplo n.º 1
0
            public async Task EnsuresArgumentsNotNull()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableEventsClient(gitHubClient);

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

                await AssertEx.Throws <ArgumentException>(async() => await client.GetUserPerformedPublic(""));
            }
Exemplo n.º 2
0
            public void RequestsCorrectUrl()
            {
                var gitHubClient = Substitute.For <IGitHubClient>();
                var client       = new ObservableEventsClient(gitHubClient);

                client.GetUserPerformedPublic("fake");

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