Most mages, whose damage is primarily skillshot-based, tend to fare poorly against assassins, who are always mobile, which is why assassins became popular midlaners in the first place.
and
tend to be especially vulnerable to assassins, due to their squishiness and enemy positioning-based damage, though with a lot of practice you can counter dives really well with both (both have stuns).
and
, on the other hand, are really good anti-dive champions: Malzahar's ultimate is a point-and-click suppress, so just save it for any assassin diving you and you'll turn the tables on them, and
's crowd control can really mess up champions trying to engage on you (her ult can also cancel her opponent's assassination potential if timed right).
I'm an unranked jungle main scrub, so take this with a grain of salt, but I think the most important part of dealing with assassins is to counter their plays no matter what: if you, as a mage, miss your poke or your combo, you can still hang back from a safe distance and try again. If an assassin fails their dive against you, however, they fall seriously behind and leave themselves open to a deadly counterattack. Don't fight them while they're diving you, because they'll always be stronger, but instead just back off until they run out of steam, whereupon they'll have burned most of their kill potential and will give you a much easier time. Never use your crowd control to go for the kill unless you're absolutely sure you can pull it off and not die, because wasting your CC leaves you wide open for the assassin's combo. Every mage you listed also has phenomenal push potential, so I'd recommend you use that to full effectiveness by constantly putting pressure on mid lane: if your assassin stays, you can keep them under control and prevent them from snowballing. If they call for jungle help, you can take pressure of the other lanes and Dragon. If they roam, you can alert your team and punish your opponent by taking an early tower.
If you want an immobile mage main who does really well against assassins, I'd also recommend
: casting Gravity Field directly on top of yourself will prevent any assassin from diving you (or punish them heavily if they do), and his late-game burst is so strong that you can bring literally any squishy down from 100 to 0 with an E + Q +
combo. He also has some of the strongest and most satisfying pushing power in the game for an AP champion (his augmented E one-shots caster minions early, and can one-shot entire waves later on). Out of the four assassins you mentioned, three (
,
and
) have abysmal early games: Viktor's Q poke gives cheap and super-strong guaranteed harass, and if you can land his laser reliably as well you can easily force these assassins out of lane repeatedly. If you fall behind or can't poke reliably, ranking Q first will also give you a measure of defense via its shield, and augmenting it first will give you enough mobility to retreat if things go sour.