A Co Londonderry man allegedly attacked a train station employee with his belt in a row over tickets, the High Court has heard.