The teenage singer was giving evidence at the trial of 21-year-old Mark Fisher at the High Court in Glasgow.
Fisher is accused of a sex attack on a young woman at a property in Wishaw, Lanarkshire in March of last year.
Mr McDonald - runner-up in last year's X-Factor - was one of a number of witnesses called to give evidence yesterday.
It is claimed Fisher had sex with the young woman while she was asleep and incapable of giving consent.
The court heard he is alleged to have attacked her in a room while the X-Factor star and other young people were also there.
Fisher, also of Wishaw, denies rape.
The trial, before Judge Lady Wise, continues.