Records of the Three Kingdoms
Cao Rui, courtesy name Yuanzhong, was Cao Pi’s son by Lady Zhen. Cao Pi favored him as a child, and he could write. When Cao Pi died in 226, Cao Rui became emperor at twenty-three. During his reign Zhuge Liang campaigned north more than once. Cao Zhen and then Sima Yi held the west. Gongsun Yuan rebelled in Liaodong and was destroyed by Sima Yi.
Late in the reign Cao Rui built heavily in Luoyang and enlarged the parks. The labor was severe. Yang Fu, Gaotang Long, and others remonstrated. He did not fully listen. He died of illness in 239, at thirty-five. He had no son of his own to name. He left the adopted heir Cao Fang, Prince of Qi, and a testament charging Cao Shuang and Sima Yi to govern together. That arrangement led straight to the coup at Gaoping Tombs.
Romance of the Three Kingdoms
The novel’s Cao Rui is suspicious and fond of building. He sits in Luoyang and hears reports from the west. When Zhuge Liang sends women’s clothes to shame Sima Yi, the ministers say Sima Yi has been insulted, and Cao Rui sends a man to stop him fighting. The book turns a deliberate defense into a misunderstanding between emperor and general.
The deathbed charge to Cao Shuang and Sima Yi is already a road toward the Sima monopoly.
Reference: Wikipedia · Cao Rui