Check row count
Removed redundant index check
Use && instead of ||
Updated assertion message
Fixed expected/actual parameter ordering