In January 2017, just days before taking office, President-elect Donald J. Trump announced a couple of promotions.

“My two sons — who are right here, Don and Eric — are going to be running the company,” he told a group of reporters. “They are going to be running it in a very professional manner.”

Nearly seven years later, Mr. Trump’s sons are alongside him as defendants in a civil case that accuses them of a decades-long fraud. On Wednesday, Donald Trump Jr. is scheduled to testify about his role in creating the family business’s financial statements, which New York’s attorney general says were inflated. Eric Trump is expected to follow, and the former president and Ivanka Trump are likely to testify next week.

The presence of Mr. Trump’s children at the trial underscores how, along with wealth and positions of influence, they inherited the legal troubles that have trailed their father for years. His sons will be the 22nd and 23rd witnesses at the trial, where lawyers for the attorney general, Letitia James, have sought to show how the Trumps manipulated the value of the assets on the financial statements to receive favorable treatment from banks and insurers.

Mr. Trump’s two adult sons have spent their careers at their father’s company, the Trump Organization. When Donald J. Trump became president, their responsibilities grew. Mr. Trump appointed Donald Trump Jr. as a trustee of the entity that controls his vast enterprise, while Eric Trump took over daily control of the family business, acting as the de facto chief executive.

Ms. James’s lawsuit accuses both sons of being involved with the financial statements, which they deny, as well as other acts that tie them to the fraud. She accused Eric Trump of providing false valuations related to the family’s estate in Westchester County, N.Y., and noted that Donald Trump Jr. had personally certified each financial statement after his father became president.

Although Mr. Trump’s sons could have asserted their Fifth Amendment rights against answering questions, doing so would have been risky. In a civil case, a jury or judge is allowed to make a negative assumption when a defendant declines to testify.

Ms. James has another notable advantage: Before the trial began last month, the judge found that Mr. Trump, his sons and the other defendants were liable for fraud and had artificially inflated the values of properties like Trump Tower and 40 Wall Street.

Mr. Trump’s lawyers have appealed that ruling. But as they wait for a higher court to assess their appeal, which is based partly on the argument that valuations are subjective and were in part the responsibility of others, they have defended themselves at trial, hoping to stave off the $250 million penalty Ms. James is seeking.

Ms. James also accused Ms. Trump of being involved in the fraud. Ms. Trump played a central role in the Trump Organization and was widely seen as a potential successor to her father until she joined him as a White House adviser.

This past summer, an appeals court threw out the case against Ms. Trump because of a legal deadline, noting that she had left the company once Mr. Trump’s campaign gained steam.

The brothers’ testimony will most likely reflect their contrasting personalities and roles at the business.

Donald Trump Jr.’s public persona resembles his father’s: He is a pugnacious partisan and a high-profile champion for the former president, often waging the family’s culture wars on social media or on his podcast, “Triggered.” His relevance to the trial stems largely from the somewhat ceremonial roles he assumed when his father became president.

Eric Trump is more of a businessman than a politician, and has cast himself as the moderating voice within a polarizing family. On the trial’s first day, he approached Ms. James and shook her hand, while his father scowled at her from a distance. Eric Trump has continued to attend the trial since, paying close attention to testimony about spreadsheets filled with valuations and the fine print of insurance deals.

In recent years, Eric has become the hands-on leader of the Trump Organization. He oversaw the company’s golf business for years before expanding his role to oversee every aspect of the company.

Under questioning from Ms. James’s lawyers during a deposition before trial, Eric Trump distanced himself from the conduct at the center of the case: pegging the worth of his father’s assets.

“I pour concrete,” he said in the deposition. “I operate properties. I don’t focus on appraisals.”

Yet one of Ms. James’s witnesses contradicted that claim at trial. And when Eric Trump testifies this week, Ms. James’s lawyers are expected to question him aggressively on his role at the company.

Her team has said he provided the values for the Seven Springs estate, as well as for a Westchester golf club, that were ultimately woven into his father’s annual financial statements.

Eric Trump was, Ms. James’s team wrote in court papers, the company’s “chief decision maker.”