A popular prime minister candidate and a well-known thriller book writer face each other in court after she accuses him of sexual abuse just before the election.