そんなことをするとは

to think someone would do such a thing

→ そんな
phrase Rare #39,179
to think someone would do such a thing Expresses surprise, disbelief, or criticism about someone doing something. Often followed by an emotional reaction or judgment.
JA: そんなことをするとは、彼も意外だった。
EN: I was surprised that he would do such a thing.

そんなことをするとは彼は頭がおかしいに違いない

He must be crazy to do something like that.

そんなことをするとは彼は正直であるはずがない

Someone who would do such a thing can’t possibly be honest.

そんなことをするとは彼女はとても不注意だった

She was very careless to do such a thing.