A federal judge has dismissed a legal challenge of Prime Minister Justin Trudeau's move to prorogue Parliament.