public async Task EnsuresNonNullArguments() { var connection = Substitute.For <IApiConnection>(); var client = new RepositoryInvitationsClient(connection); await Assert.ThrowsAsync <ArgumentNullException>(() => client.GetAllForRepository(1, null)); }
public async Task RequestsCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new RepositoryInvitationsClient(connection); await client.GetAllForRepository(1); connection.Received().GetAll <RepositoryInvitation>(Arg.Is <Uri>(u => u.ToString() == "repositories/1/invitations"), null, "application/vnd.github.swamp-thing-preview+json", Args.ApiOptions); }