assertThrown doesn't need to use a variable for a throw check.
Merge pull request #1573 from AndrejMitrovic/RefactorThrown

assertThrown doesn't need to use a variable for a throw check.