Assertions refactor

if-else changed to switch-case for better readibility.