convert given-when to if-else
Merge pull request #6 from takuji31/fix_no_warnings

convert given-when to if-else