Through Crown prosecutor Joshua Shaw she said the man added her as a friend on Facebook in 2009 despite them not knowing each other previously.
"He sent me a message on Facebook, a private message, then you click on the button to add me as a friend," she said.
The pair then started emailing and texting "off and on" about work, hobbies and interests, and began to meet up occasionally, she said.
Early on the man made it clear he had a sexual interest in her, Mr Shaw told the jury of eight women and four men.
On January 3, 2010 the pair had consensual sex at his house but afterwards he said he had to go out, leaving her feeling used, she said.
As result of the encounter she came to view him as a friend at best, or less, she said.
Over the next few months their contact was less frequent and was largely initiated by him, she said.
On September 25, 2010, she was out of town visiting friends and planned to travel north of Auckland in the evening to go to a party.
However, she became stuck in Auckland after realising she had left behind the person's contact details and needed somewhere to stay the night.
Staying with the accused was not her first choice, but she eventually accepted his offer to stay the night after making it clear to him she did not want anything sexual to take place, she said.
After arriving at the man's house the pair briefly watched a movie before going to the man's room.
She then changed into pyjama pants, keeping her top on, and he removed all of his clothes, she said.
After they got into bed his behaviour became sexual and she initially reciprocated, "but not to the extent that he was", she said.
His behaviour then escalated in spite of her verbally and physically resisting him, she said.
"When he was doing that I was saying 'no, I did't want to do that'. He did get a bit angry that I did not want to do those things."
Afterwards he apologised for making her uncomfortable and said she could leave, which she did.
"I did feel used and pretty angry," she said about the incident.
A few days later she texted the man asking for an explanation for his actions, which he didn't respond to. When the woman later sent him a message on Facebook asking the same, he asked her to leave him alone, she said.
About a week later she reported the matter to police.
The trial is expected to take up to five days.