It seems clear that the attack against Atreides is more or less unprecedented. Duke Leto is an experienced leader, familiar with the conventions and rules of the military and political landscape, and is presumably anticipating maneuvers that fit within his experience. Consider that Thufir Hawat is stunned by the scale of the attack:
He had always expected their enemy to hire an occasional lighter from the guild for probing raids. That was an ordinary enough gambit in this kind of House-to-House warefare.
In comparison, when considering the actual attack, he judges
The entire spice income of Arrakis for fifty years might just cover the cost of such a venture.
Leto definitely anticipates a trap, but misjudges the nature of the trap. He expects the Harkonnens to try to kill his family, but probably through assassination rather than open warefare - the Harkonnens are treacherous and it fits their style. Moreover, he knows they must follow the rules of kanly, so he believes he understands how they will operate.
Though I’ve only read the book once, I didn’t get the impression Leto thought the Emperor would try to destroy his family. He knows the Emperor is laying a trap for him, but he thinks Arrakis is meant to be a white elephant. He can’t refuse the appointment, as that would have apparently dire consequences. On the other hand, Leto knows the Harkonnens will have laid traps and will leave agents behind to conduct sabotage and ferment rebellion.
From the Duke’s perspective, he’s intended to take on management of an expensive operation on an unfamiliar planet with numerous natural and human impediments, as well as sabotage and skirmishes with an entrenched opposition who knows the terrain better. He probably suspects the Emperor plans to sap his resources dealing with problems on Arrakis, letting the Harkonnens harass the Atreides at every turn, while blaming him for diminished spice output. When Leto proves inadequate to the task and the other Landsraad houses become upset at the economic impact, the Emperor will remove Arrakis from Atreides control and give it back to the Harkonnens, having diminished the Atreides’ wealth and reputation.
Which would seem like a very reasonable way for the Emperor to deal with him.