GetAllUserReceivedPublic() public method

Gets all the events that have been received by a given user.
http://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received
public GetAllUserReceivedPublic ( string user ) : Task>
user string The login of the user
return Task>
Ejemplo n.º 1
0
            public async Task EnsuresArgumentsNotNull()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new EventsClient(connection);

                await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllUserReceivedPublic(null));
                await Assert.ThrowsAsync<ArgumentException>(() => client.GetAllUserReceivedPublic(""));
            }
Ejemplo n.º 2
0
            public void RequestsCorrectUrl()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new EventsClient(connection);

                client.GetAllUserReceivedPublic("fake");

                connection.Received().GetAll<Activity>(Arg.Is<Uri>(u => u.ToString() == "users/fake/received_events/public"));
            }