Given that the best defense is an aggressive offense, Gretchen Carlson can expect a withering attack from Fox News Chairman Roger Ailes, both in public and in court.

In the two days since the former Fox News anchor filed a sexual harassment suit against the powerful chief of the country's highest-rated cable TV network, personal notes have leaked in support of Ailes' contention that they actually were on good terms.

Additionally, Fox News, a unit of Rupert Murdoch's 21st Century Fox (FOXA) , has been quick this week to counter Carlson's claim that ratings at her afternoon show The Real Story with Gretchen Carlson were sufficiently strong to prevent Ailes from not renewing her contract.

If the case does go to court, Carlson can expect a forceful attack on her central premise: that the former Miss America's 10-year on-camera career at Fox News was stymied because of her unwillingness to submit to Ailes' alleged sexual advances or tolerate a workplace climate of sexual harassment.

"This case will boil down to whether Gretchen Carlson's career was harmed by rebuffing those alleged advances," said Jason Lohr, a San Francisco partner in the law firm of Hogan Lovells. "She will need to show that retaliatory actions were taken as a result of Ailes' alleged behavior rather than anything to do with her performance as an anchor."

Carlson, a graduate of Stanford University and a former Miss America, was a host of the network's flagship morning show Fox & Friends from 2006 until 2013, when she was replaced by Elisabeth Hasselbeck and given her own show. Carlson joined Fox after a five-year stint at CBS, where she had worked as a news correspondent and co-host of The Early Show on Saturday.

According to Fox, Carlson's contract was not renewed as a result of being the lowest-rated show at the network. Carlson, in the lawsuit filed Wednesday in the Superior Court of New Jersey, contends that The Real Story was winning its afternoon time slot on a 33% ratings increase since the start of 2016.

Carlson's contention that her removal from Fox & Friends was a demotion might also be challenged.

"She's going to say it's a demotion because the network didn't sufficiently promote her new show and because it was in a less attractive slot, and therefore she was set up to fail," New York employment attorney Neal Brickman said. "A jury of lay people looking at that will say, 'You went from sharing a show to having your own show.' That's not a demotion, that's a promotion."

The challenge for Carlson, then, will be to turn the tables on Ailes and his lawyers, countering that she was doing her best to advance her career and stay on his good side despite having to weather what her suit describes as a a climate of "pervasive sexual harassment."

And on that score, Carlson would appear to have a wealth of examples. 

The lawsuit alleged Ailes was caught "ogling Carlson in his office and asking her to turn around so he could view her posterior" in addition to "commenting repeatedly about Carlson's legs."

Ailes, the longtime Fox News chairman with considerable influence within the Republican Party, also was said to say, "I'm sure you [Carlson] can do sweet nothings when you want to." When Carlson said she objected to his comments, Ailes allegedly responded by calling her a "man hater" while telling her to "get along with the boys." 

Whether or not there are other women with similar stories to tell, and whether they would be willing to testify on Carlson's behalf, remains unclear. Carlson's attorney Nancy Erika Smith of Smith Mullin told Politico this week that at least 10 other people have come forward to help.

On the basis of her career in the television news business, Carlson would appear to have a strong enough case to withstand a motion from Ailes' attorneys to have it dismissed with or without corroboration.

"If she's a credible source, and she certainly appears to be, she could clearly prove it simply through the strength of her own testimony," said Daniel Kaiser, an employment discrimination attorney at Kaiser Saurborn & Mair in New York. "While corroboration would be helpful, it's certainly not necessary."

Carlson also might argue that coming forward with these kinds of allegations was never going to be easy and that the case could jeopardize her career in broadcast journalism. In other words, she thought long and hard about taking action but was afraid she'd lose her job in the process.

Indeed, a source close to the case said Carlson never formally made a complaint about Ailes to the company's human resources office. Similarly, Brickman said, Carlson could argue that she feared immediate retribution in the workplace that Ailes tightly controlled.

For Ailes, the stakes are equally high. Attacking Carlson in the press or in court ultimately could backfire, both for a man with a fearsome reputation and a news network famous for rejecting notions of gender equality in the workplace and home.

"While it may be perfectly fine for Fox News to have attractive women communicating the news, it doesn't imply that in the workplace Roger Ailes and the boys are entitled to condition terms of employment on submission to sexual advances, or to sexualize the workplace through comments made to women or about women, which is part of her allegations," Kaiser said.

And although Fox News isn't named in the lawsuit, the network stands to lose even if Ailes were to be vindicated in court. Ellen Pao's gender discrimination lawsuit last year against Silicon Valley venture capital firm Kleiner Perkins Caufield & Byers showed that even winning carries drawbacks.

Kleiner Perkins won, but bawdy testimony sullied its reputation and cast a nasty light on the treatment of women in the technology industry.

"The allegations in Carlson's complaint are just too salacious for Fox to let them linger," Brickman said. "I'm frankly surprised it's gotten this far."