While what you went through is definitely not cool, I think this was a mistake:
> since I didn't seek any other jobs while trial working for them
IMO a trial project is just another step in the interviewing process so you should have continued to interview with others. You might have even gotten another offer in the meantime and forced their hand to make a decision before the trial period is over.